cnic: Don't take rcu_read_lock in cnic_rcv_netevent()
authorMichael Chan <mchan@broadcom.com>
Tue, 3 Jun 2014 06:08:46 +0000 (23:08 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Jun 2014 06:16:41 +0000 (23:16 -0700)
commit20f30c2d5ea44925cb83b0fdae78b8600a76b66e
tree6645ecf039b795d6de8579e4c8ab4da22cedb181
parent74f43922dc985119fa84c19c648445f81d0c7706
cnic: Don't take rcu_read_lock in cnic_rcv_netevent()

Because the called function, such as bnx2fc_indicate_netevent(), can sleep,
we cannot take rcu_lock().  To prevent the rcu protected ulp_ops from going
away, we use the cnic_lock mutex and set the ULP_F_CALL_PENDING flag.
The code already waits for ULP_F_CALL_PENDING flag to clear in
cnic_unregister_device().

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