dcbnl : Disable software interrupts before taking dcb_lock
authorAnish Bhatt <anish@chelsio.com>
Sat, 15 Nov 2014 00:38:31 +0000 (16:38 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 16 Nov 2014 19:50:52 +0000 (14:50 -0500)
commit52cff74eef5dd7bdab759300e7d1ca36eba18254
treeeaf4980da5e83b19429e9f04589865eea0276394
parent8c2dd54485ccee7fc4086611e188478584758c8d
dcbnl : Disable software interrupts before taking dcb_lock

Solves possible lockup issues that can be seen from firmware DCB agents calling
into the DCB app api.

DCB firmware event queues can be tied in with NAPI so that dcb events are
generated in softIRQ context. This can results in calls to dcb_*app()
functions which try to take the dcb_lock.

If the the event triggers while we also have the dcb_lock because lldpad or
some other agent happened to be issuing a  get/set command we could see a cpu
lockup.

This code was not originally written with firmware agents in mind, hence
grabbing dcb_lock from softIRQ context was not considered.

Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dcb/dcbnl.c