can: should not use __dev_get_by_index() without locks
authorEric Dumazet <eric.dumazet@gmail.com>
Fri, 6 Nov 2009 00:23:01 +0000 (00:23 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 8 Nov 2009 08:33:43 +0000 (00:33 -0800)
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>

No differences found