summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorChengfeng Ye <dg573847474@gmail.com>2023-08-02 16:14:36 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-08-18 20:18:59 +0300
commit84c10951da91575778cbc3d199cdddea3d42d905 (patch)
tree45588bc62f32d56d6197637e197d3dd2660d1638 /drivers/video
parent28a45ef85e25ed05fb5d8846ec01f752618dad44 (diff)
downloadlinux-84c10951da91575778cbc3d199cdddea3d42d905.tar.xz
ocfs2: cluster: fix potential deadlock on &o2net_debug_lock
&o2net_debug_lock is acquired by timer o2net_idle_timer() along the following call chain. Thus the acquisition of the lock under process context should disable bottom half, otherwise deadlock could happen if the timer happens to preempt the execution while the lock is held in process context on the same CPU. <timer interrupt> -> o2net_idle_timer() -> queue_delayed_work() -> sc_put() -> sc_kref_release() -> o2net_debug_del_sc() -> spin_lock(&o2net_debug_lock); Several lock acquisition of &o2net_debug_lock under process context do not disable irq or bottom half. The patch fixes these potential deadlocks scenerio by using spin_lock_bh() on &o2net_debug_lock. This flaw was found by an experimental static analysis tool I am developing for irq-related deadlock. x86_64 allmodconfig using gcc shows no new warning. Link: https://lkml.kernel.org/r/20230802131436.17765-1-dg573847474@gmail.com Signed-off-by: Chengfeng Ye <dg573847474@gmail.com> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Joseph Qi <jiangqi903@gmail.com> Cc: Gang He <ghe@suse.com> Cc: Jun Piao <piaojun@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/video')
0 files changed, 0 insertions, 0 deletions