From: Florian Westphal Date: Tue, 27 Oct 2015 12:20:25 +0000 (+0100) Subject: netfilter: nfnetlink: don't probe module if it exists X-Git-Tag: v3.16.35~966 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c01bb4f0ba43eba5cdfc0a39aa381252f10e510e;p=thirdparty%2Fkernel%2Fstable.git netfilter: nfnetlink: don't probe module if it exists commit dbc3617f4c1f9fcbe63612048cb9583fea1e11ab upstream. nfnetlink_bind request_module()s all the time as nfnetlink_get_subsys() shifts the argument by 8 to obtain the subsys id. So using type instead of type << 8 always returns NULL. Fixes: 03292745b02d11 ("netlink: add nlk->netlink_bind hook for module auto-loading") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso Signed-off-by: Luis Henriques --- diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c index 6ae88ace21cbc..cddab2101569c 100644 --- a/net/netfilter/nfnetlink.c +++ b/net/netfilter/nfnetlink.c @@ -406,7 +406,7 @@ static int nfnetlink_bind(int group) int type = nfnl_group2type[group]; rcu_read_lock(); - ss = nfnetlink_get_subsys(type); + ss = nfnetlink_get_subsys(type << 8); rcu_read_unlock(); if (!ss) request_module("nfnetlink-subsys-%d", type);