net: bpfilter: use cleanup callback to release umh_info

Now, UMH process is killed, do_exit() calls the umh_info->cleanup callback
to release members of the umh_info.
This patch makes bpfilter_umh's cleanup routine to use the
umh_info->cleanup callback.

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Taehee Yoo 2019-01-09 02:24:34 +09:00 committed by David S. Miller
parent 73ab1cb2de
commit 5b4cb650e5
3 changed files with 44 additions and 23 deletions

View file

@ -3,13 +3,18 @@
#define _LINUX_BPFILTER_H
#include <uapi/linux/bpfilter.h>
#include <linux/umh.h>
struct sock;
int bpfilter_ip_set_sockopt(struct sock *sk, int optname, char __user *optval,
unsigned int optlen);
int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char __user *optval,
int __user *optlen);
extern int (*bpfilter_process_sockopt)(struct sock *sk, int optname,
char __user *optval,
unsigned int optlen, bool is_set);
struct bpfilter_umh_ops {
struct umh_info info;
int (*sockopt)(struct sock *sk, int optname,
char __user *optval,
unsigned int optlen, bool is_set);
};
extern struct bpfilter_umh_ops bpfilter_ops;
#endif