linux/net/netlabel
Paul Moore b914f3a2a3 netlabel: Fix several rcu_dereference() calls used without RCU read locks
The recent changes to add RCU lock verification to rcu_dereference() calls
caught out a problem with netlbl_unlhsh_hash(), see below.

 ===================================================
 [ INFO: suspicious rcu_dereference_check() usage. ]
 ---------------------------------------------------
 net/netlabel/netlabel_unlabeled.c:246 invoked rcu_dereference_check()
 without protection!

This patch fixes this problem as well as others like it in the NetLabel
code.  Also included in this patch is the identification of future work
to eliminate the RCU read lock in netlbl_domhsh_add(), but in the interest
of getting this patch out quickly that work will happen in another patch
to be finished later.

Thanks to Eric Dumazet and Paul McKenney for their help in understanding
the recent RCU changes.

Signed-off-by: Paul Moore <paul.moore@hp.com>
Reported-by: David Howells <dhowells@redhat.com>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-01 18:32:08 -07:00
..
Kconfig [NETLABEL]: Fix build failure. 2006-11-05 16:44:06 -08:00
Makefile netlabel: Add a generic way to create ordered linked lists of network addrs 2008-10-10 10:16:32 -04:00
netlabel_addrlist.c netlabel: Always remove the correct address selector 2009-04-22 00:46:09 -07:00
netlabel_addrlist.h netlabel: Fix compilation warnings in net/netlabel/netlabel_addrlist.c 2008-10-30 10:44:48 -04:00
netlabel_cipso_v4.c netlabel: Use genl_register_family_with_ops() 2009-05-21 16:50:24 -07:00
netlabel_cipso_v4.h netlabel: Add configuration support for local labeling 2008-10-10 10:16:34 -04:00
netlabel_domainhash.c netlabel: Fix several rcu_dereference() calls used without RCU read locks 2010-04-01 18:32:08 -07:00
netlabel_domainhash.h netlabel: Update kernel configuration API 2008-12-31 12:54:11 -05:00
netlabel_kapi.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-07-30 19:22:43 -07:00
netlabel_mgmt.c netlabel: Use genl_register_family_with_ops() 2009-05-21 16:50:24 -07:00
netlabel_mgmt.h netlabel: Add network address selectors to the NetLabel/LSM domain mapping 2008-10-10 10:16:32 -04:00
netlabel_unlabeled.c netlabel: Fix several rcu_dereference() calls used without RCU read locks 2010-04-01 18:32:08 -07:00
netlabel_unlabeled.h netlabel: Update kernel configuration API 2008-12-31 12:54:11 -05:00
netlabel_user.c Audit: collect sessionid in netlink messages 2008-04-28 06:18:03 -04:00
netlabel_user.h Audit: collect sessionid in netlink messages 2008-04-28 06:18:03 -04:00