aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/array.c
diff options
context:
space:
mode:
authorZheng Wang <[email protected]>2023-03-10 08:40:07 +0000
committerGuenter Roeck <[email protected]>2023-03-12 18:13:25 +0000
commitcb090e64cf25602b9adaf32d5dfc9c8bec493cd1 (patch)
treeed7617f114d00d6be710a8dc48296a885208aa2e /fs/proc/array.c
parenthwmon: (adt7475) Fix masking of hysteresis registers (diff)
downloadkernel-cb090e64cf25602b9adaf32d5dfc9c8bec493cd1.tar.gz
kernel-cb090e64cf25602b9adaf32d5dfc9c8bec493cd1.zip
hwmon: (xgene) Fix use after free bug in xgene_hwmon_remove due to race condition
In xgene_hwmon_probe, &ctx->workq is bound with xgene_hwmon_evt_work. Then it will be started. If we remove the driver which will call xgene_hwmon_remove to clean up, there may be unfinished work. The possible sequence is as follows: Fix it by finishing the work before cleanup in xgene_hwmon_remove. CPU0 CPU1 |xgene_hwmon_evt_work xgene_hwmon_remove | kfifo_free(&ctx->async_msg_fifo);| | |kfifo_out_spinlocked |//use &ctx->async_msg_fifo Fixes: 2ca492e22cb7 ("hwmon: (xgene) Fix crash when alarm occurs before driver probe") Signed-off-by: Zheng Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
Diffstat (limited to 'fs/proc/array.c')
0 files changed, 0 insertions, 0 deletions