netfilter: x_tables: Update remaining dereference to RCU
commit5.4-rM2-2.2.x-imx-squashed443d6e86f8
upstream. This fixes the dereference to fetch the RCU pointer when holding the appropriate xtables lock. Reported-by: kernel test robot <lkp@intel.com> Fixes:cc00bcaa58
("netfilter: x_tables: Switch synchronization to RCU") Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> Reviewed-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
parent
828f2a20f9
commit
e0281bb5a8
|
@ -1406,7 +1406,7 @@ static int compat_get_entries(struct net *net,
|
|||
xt_compat_lock(NFPROTO_ARP);
|
||||
t = xt_find_table_lock(net, NFPROTO_ARP, get.name);
|
||||
if (!IS_ERR(t)) {
|
||||
const struct xt_table_info *private = t->private;
|
||||
const struct xt_table_info *private = xt_table_get_private_protected(t);
|
||||
struct xt_table_info info;
|
||||
|
||||
ret = compat_table_info(private, &info);
|
||||
|
|
|
@ -1616,7 +1616,7 @@ compat_get_entries(struct net *net, struct compat_ipt_get_entries __user *uptr,
|
|||
xt_compat_lock(AF_INET);
|
||||
t = xt_find_table_lock(net, AF_INET, get.name);
|
||||
if (!IS_ERR(t)) {
|
||||
const struct xt_table_info *private = t->private;
|
||||
const struct xt_table_info *private = xt_table_get_private_protected(t);
|
||||
struct xt_table_info info;
|
||||
ret = compat_table_info(private, &info);
|
||||
if (!ret && get.size == info.size)
|
||||
|
|
|
@ -1625,7 +1625,7 @@ compat_get_entries(struct net *net, struct compat_ip6t_get_entries __user *uptr,
|
|||
xt_compat_lock(AF_INET6);
|
||||
t = xt_find_table_lock(net, AF_INET6, get.name);
|
||||
if (!IS_ERR(t)) {
|
||||
const struct xt_table_info *private = t->private;
|
||||
const struct xt_table_info *private = xt_table_get_private_protected(t);
|
||||
struct xt_table_info info;
|
||||
ret = compat_table_info(private, &info);
|
||||
if (!ret && get.size == info.size)
|
||||
|
|
Loading…
Reference in New Issue