summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bpfilter/bpfilter_kern.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/bpfilter/bpfilter_kern.c b/net/bpfilter/bpfilter_kern.c
index 7596314b61c7..b13d058f8c34 100644
--- a/net/bpfilter/bpfilter_kern.c
+++ b/net/bpfilter/bpfilter_kern.c
@@ -33,7 +33,8 @@ static void shutdown_umh(struct umh_info *info)
static void __stop_umh(void)
{
- if (bpfilter_process_sockopt) {
+ if (IS_ENABLED(CONFIG_INET) &&
+ bpfilter_process_sockopt) {
bpfilter_process_sockopt = NULL;
shutdown_umh(&info);
}
@@ -98,7 +99,9 @@ static int __init load_umh(void)
stop_umh();
return -EFAULT;
}
- bpfilter_process_sockopt = &__bpfilter_process_sockopt;
+ if (IS_ENABLED(CONFIG_INET))
+ bpfilter_process_sockopt = &__bpfilter_process_sockopt;
+
return 0;
}