netfilter: x_tables: Update remaining dereference to RCU
Subsystems (2)
PATCH 1/1 netfilter: x_tables: Update remaining dereference to RCU
This fixes the dereference to fetch the RCU pointer when holding the appropriate xtables lock.
Reported-by kernel test robot <[email protected]>
Fixes cc00bcaa5899 ("netfilter: x_tables: Switch synchronization to RCU")
Signed-off-by Subash Abhinov Kasiviswanathan <[email protected]>
--- net/ipv4/netfilter/arp_tables.c | 2 +- net/ipv4/netfilter/ip_tables.c | 2 +- net/ipv6/netfilter/ip6_tables.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
net/ipv4/netfilter/arp_tables.c +1 -1
@@ -1379,7 +1379,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);
net/ipv4/netfilter/ip_tables.c +1 -1
@@ -1589,7 +1589,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)
net/ipv6/netfilter/ip6_tables.c +1 -1
@@ -1598,7 +1598,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)
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Quoted 6 lines · Subash Abhinov Kasiviswanathan
This fixes the dereference to fetch the RCU pointer when holding the appropriate xtables lock.
Reported-by kernel test robot <[email protected]>Fixes cc00bcaa5899 ("netfilter: x_tables: Switch synchronization to RCU")Signed-off-by Subash Abhinov Kasiviswanathan <[email protected]>
Reviewed-by Florian Westphal <[email protected]>
Quoted 2 lines · Subash Abhinov Kasiviswanathan
This fixes the dereference to fetch the RCU pointer when holding the appropriate xtables lock.
Applied, thanks.