lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 29 Oct 2007 14:06:18 -0700 From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com> To: linux-kernel@...r.kernel.org, netdev@...r.kernel.org Cc: rusty@....ibm.com, zhaojingmin@...rs.sourceforge.net, davem@...emloft.net Subject: [PATCH] nf_nat_h323.c unneeded rcu_dereference() calls Hello! While reviewing rcu_dereference() uses, I came across a number of cases where I couldn't see how the rcu_dereference() helped. One class of cases is where the variable is never subsequently dereferenced, so that patches like the following one would be appropriate. So, what am I missing here? Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com> --- nf_nat_h323.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff -urpNa -X dontdiff linux-2.6.23/net/ipv4/netfilter/nf_nat_h323.c linux-2.6.23-rcufix/net/ipv4/netfilter/nf_nat_h323.c --- linux-2.6.23/net/ipv4/netfilter/nf_nat_h323.c 2007-10-09 13:31:38.000000000 -0700 +++ linux-2.6.23-rcufix/net/ipv4/netfilter/nf_nat_h323.c 2007-10-29 14:00:13.000000000 -0700 @@ -546,15 +546,15 @@ static int nat_callforwarding(struct sk_ /****************************************************************************/ static int __init init(void) { - BUG_ON(rcu_dereference(set_h245_addr_hook) != NULL); - BUG_ON(rcu_dereference(set_h225_addr_hook) != NULL); - BUG_ON(rcu_dereference(set_sig_addr_hook) != NULL); - BUG_ON(rcu_dereference(set_ras_addr_hook) != NULL); - BUG_ON(rcu_dereference(nat_rtp_rtcp_hook) != NULL); - BUG_ON(rcu_dereference(nat_t120_hook) != NULL); - BUG_ON(rcu_dereference(nat_h245_hook) != NULL); - BUG_ON(rcu_dereference(nat_callforwarding_hook) != NULL); - BUG_ON(rcu_dereference(nat_q931_hook) != NULL); + BUG_ON(set_h245_addr_hook != NULL); + BUG_ON(set_h225_addr_hook != NULL); + BUG_ON(set_sig_addr_hook != NULL); + BUG_ON(set_ras_addr_hook != NULL); + BUG_ON(nat_rtp_rtcp_hook != NULL); + BUG_ON(nat_t120_hook != NULL); + BUG_ON(nat_h245_hook != NULL); + BUG_ON(nat_callforwarding_hook != NULL); + BUG_ON(nat_q931_hook != NULL); rcu_assign_pointer(set_h245_addr_hook, set_h245_addr); rcu_assign_pointer(set_h225_addr_hook, set_h225_addr); - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists