cnic: Prevent "scheduling while atomic" when calling ->cnic_init()
authorMichael Chan <mchan@broadcom.com>
Thu, 23 Dec 2010 07:42:57 +0000 (07:42 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Dec 2010 19:44:28 +0000 (11:44 -0800)
commit8adc9240f98a816f7e9b3d93b9446a790110e062
treeab3fbcfb3d29a9a3a1bbafd861a38f649d690e70
parent9b09336072796378dac46df63bcd43291b24fd12
cnic: Prevent "scheduling while atomic" when calling ->cnic_init()

cnic_dev_list is protected by rtnl_lock and cnic_dev_lock spin_lock during
modifications.  When looping on cnic_dev_list and calling ->cnic_init(),
we should just hold rtnl_lock since ->cnic_init() may sleep.

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