diff options
| author | Zheng Wang <[email protected]> | 2023-03-18 16:15:06 +0800 |
|---|---|---|
| committer | Hans Verkuil <[email protected]> | 2023-04-11 17:10:10 +0200 |
| commit | 5abda7a16698d4d1f47af1168d8fa2c640116b4a (patch) | |
| tree | 66756efff817724b6f7dff24f0816b1b23f848c5 /tools/perf/scripts/python | |
| parent | 91f1312069bdf51ed5f4eb979f90b78351876cc0 (diff) | |
media: dm1105: Fix use after free bug in dm1105_remove due to race condition
In dm1105_probe, it called dm1105_ir_init and bound
&dm1105->ir.work with dm1105_emit_key.
When it handles IRQ request with dm1105_irq,
it may call schedule_work to start the work.
When we call dm1105_remove to remove the driver, there
may be a sequence as follows:
Fix it by finishing the work before cleanup in dm1105_remove
CPU0 CPU1
|dm1105_emit_key
dm1105_remove |
dm1105_ir_exit |
rc_unregister_device |
rc_free_device |
rc_dev_release |
kfree(dev); |
|
| rc_keydown
| //use
Fixes: 34d2f9bf189c ("V4L/DVB: dm1105: use dm1105_dev & dev instead of dm1105dvb")
Signed-off-by: Zheng Wang <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions