diff options
| author | Chengfeng Ye <[email protected]> | 2023-06-27 15:24:49 +0000 |
|---|---|---|
| committer | Corey Minyard <[email protected]> | 2023-07-04 14:22:45 +0000 |
| commit | b02bb79eee074f07acdfde540f2d4fe2a04471d8 (patch) | |
| tree | baef4e1d99be53c712bb1e95bff08bfb83337656 /tools/perf/scripts/python/netdev-times.py | |
| parent | ipmi_si: fix a memleak in try_smi_init() (diff) | |
| download | kernel-b02bb79eee074f07acdfde540f2d4fe2a04471d8.tar.gz kernel-b02bb79eee074f07acdfde540f2d4fe2a04471d8.zip | |
ipmi: fix potential deadlock on &kcs_bmc->lock
As kcs_bmc_handle_event() is executed inside both a timer and a hardirq,
it should disable irq before lock acquisition otherwise deadlock could
happen if the timmer is preemtped by the irq.
Possible deadlock scenario:
aspeed_kcs_check_obe() (timer)
-> kcs_bmc_handle_event()
-> spin_lock(&kcs_bmc->lock)
<irq interruption>
-> aspeed_kcs_irq()
-> kcs_bmc_handle_event()
-> spin_lock(&kcs_bmc->lock) (deadlock here)
This flaw was found using an experimental static analysis tool we are
developing for irq-related deadlock.
The tentative patch fix the potential deadlock by spin_lock_irqsave()
Signed-off-by: Chengfeng Ye <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Corey Minyard <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions
