diff options
author | Junlin Yang | 2021-03-05 16:48:39 +0800 |
---|---|---|
committer | David S. Miller | 2021-03-05 13:00:38 -0800 |
commit | 69cdb7947adb816fc9325b4ec02a6dddd5070b82 (patch) | |
tree | 4d05951c9ca0c8ff7a6b0062fb20e7df42aaca60 /tools/testing | |
parent | e233febda6ebab750e30662a7cc9b9efad127685 (diff) |
ibmvnic: remove excessive irqsave
ibmvnic_remove locks multiple spinlocks while disabling interrupts:
spin_lock_irqsave(&adapter->state_lock, flags);
spin_lock_irqsave(&adapter->rwi_lock, flags);
As reported by coccinelle, the second _irqsave() overwrites the value
saved in 'flags' by the first _irqsave(), therefore when the second
_irqrestore() comes,the value in 'flags' is not valid,the value saved
by the first _irqsave() has been lost.
This likely leads to IRQs remaining disabled. So remove the second
_irqsave():
spin_lock_irqsave(&adapter->state_lock, flags);
spin_lock(&adapter->rwi_lock);
Generated by: ./scripts/coccinelle/locks/flags.cocci
./drivers/net/ethernet/ibm/ibmvnic.c:5413:1-18:
ERROR: nested lock+irqsave that reuses flags from line 5404.
Fixes: 4a41c421f367 ("ibmvnic: serialize access to work queue on remove")
Signed-off-by: Junlin Yang <yangjunlin@yulong.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions