]> rtime.felk.cvut.cz Git - socketcan-devel.git/commit
bcm_proc_getifname() is called with RTNL and dev_base_lock
authorhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Sun, 8 Nov 2009 17:29:22 +0000 (17:29 +0000)
committerhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Sun, 8 Nov 2009 17:29:22 +0000 (17:29 +0000)
commit91023980b37677d9b623115e80a0dd1e18615a80
tree9dc623e0f260f8b0e4ecd4efca0c7b583eaa96ca
parentc33793dd2dcbbcda70a955e9d32fc577527ff2a9
bcm_proc_getifname() is called with RTNL and dev_base_lock
not held. It calls __dev_get_by_index() without locks, and
this is illegal (might crash)

Close the race by holding dev_base_lock and copying dev->name
in the protected section.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
http://git.kernel.org/?p=linux/kernel/git/davem/net-2.6.git;a=commitdiff;h=6755aebaaf9fc5416acfd4578ab7a1e122ecbc74

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1079 030b6a49-0b11-0410-94ab-b0dab22257f2
kernel/2.4/net/can/bcm.c
kernel/2.6/net/can/bcm.c