]> git.baikalelectronics.ru Git - kernel.git/commit
cnic: Fix locking in start/stop calls.
authorMichael Chan <mchan@broadcom.com>
Fri, 14 Aug 2009 15:49:46 +0000 (15:49 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 16 Aug 2009 01:50:44 +0000 (18:50 -0700)
commitd7c0bcff80d4a378389dac06f907e2b1d01e7620
tree50605514ea7316f8a6316a93e205c0c9a3fb4399
parent7d922776c501904578ac232253c9202075a0ab43
cnic: Fix locking in start/stop calls.

The slow path ulp_start and ulp_stop calls to the bnx2i driver
are sleepable calls and therefore should not be protected using
rcu_read_lock.  Fix it by using mutex and setting a bit during
these calls.  cnic_unregister_device() will now wait for the bit
to clear before completing the call.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/cnic.c
drivers/net/cnic.h