]> git.baikalelectronics.ru Git - kernel.git/commit
bnx2: Free IRQ before freeing status block memory
authorMichael Chan <mchan@broadcom.com>
Fri, 31 Dec 2010 19:03:14 +0000 (11:03 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 31 Dec 2010 19:03:14 +0000 (11:03 -0800)
commit07a708b4811748ba5d8f9bf530a83cd7a9a419f1
tree46506c127a2d37ef00dca9752cc93e15e2f7b727
parent8b88c4c37b7921f7af470d123778712b2c7d7842
bnx2: Free IRQ before freeing status block memory

When changing ring size, we free all memory including status block
memory.  If we're in INTA mode and sharing IRQ, the IRQ handler can
be called and it will reference the NULL status block pointer.

Because of the lockless design of the IRQ handler, there is no simple
way to synchronize and prevent this.  So we avoid this problem by
freeing the IRQ handler before freeing the status block memory.

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