diff options
| author | Hannes Reinecke <[email protected]> | 2020-09-24 10:45:59 +0000 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2020-11-02 23:09:49 +0000 |
| commit | 5faf50e9e9fdc2117c61ff7e20da49cd6a29e0ca (patch) | |
| tree | abbe157a8252e3270e0569fe61c3bab1a7735998 /scripts/gcc-plugins/structleak_plugin.c | |
| parent | scsi: hpsa: Fix memory leak in hpsa_init_one() (diff) | |
| download | kernel-5faf50e9e9fdc2117c61ff7e20da49cd6a29e0ca.tar.gz kernel-5faf50e9e9fdc2117c61ff7e20da49cd6a29e0ca.zip | |
scsi: scsi_dh_alua: Avoid crash during alua_bus_detach()
alua_bus_detach() might be running concurrently with alua_rtpg_work(), so
we might trip over h->sdev == NULL and call BUG_ON(). The correct way of
handling it is to not set h->sdev to NULL in alua_bus_detach(), and call
rcu_synchronize() before the final delete to ensure that all concurrent
threads have left the critical section. Then we can get rid of the
BUG_ON() and replace it with a simple if condition.
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Cc: Brian Bunker <[email protected]>
Acked-by: Brian Bunker <[email protected]>
Tested-by: Jitendra Khasdev <[email protected]>
Reviewed-by: Jitendra Khasdev <[email protected]>
Signed-off-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/structleak_plugin.c')
0 files changed, 0 insertions, 0 deletions
