]> www.infradead.org Git - users/jedix/linux-maple.git/commit
be2net: protect eqo->affinity_mask from getting freed twice
authorKalesh AP <kalesh.purayil@avagotech.com>
Wed, 5 Aug 2015 07:27:50 +0000 (03:27 -0400)
committerManjunath Govindashetty <manjunath.govindashetty@oracle.com>
Fri, 16 Oct 2015 00:07:55 +0000 (17:07 -0700)
commit3193c594bb6e7b1c3f49dba09d389ac117ef21e0
tree7fb271791b536b65221489797a7e276b9f9ee984
parent0990046a74da04f415c58a5fa5a66b99f73c8279
be2net: protect eqo->affinity_mask from getting freed twice

There are paths in the driver such as an unrecoverable error (UE) detection
followed by a driver unload wherein be_clear() is invoked twice.
Individual data structures are reset so that they are not cleaned/freed
twice. This patch does the same for eqo->affinity_mask. It is freed only
if EQs haven't yet been destroyed. This fixes a possible crash when
affinity_mask is freed twice.

Signed-off-by: Kalesh AP <kalesh.purayil@avagotech.com>
Signed-off-by: Sathya Perla <sathya.perla@avagotech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_main.c