diff options
author | Roland Dreier <roland@purestorage.com> | 2012-11-05 18:02:40 -0800 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-11-07 20:12:07 -0800 |
commit | 998866b0740f128fd2c107c167c8385406dadae0 (patch) | |
tree | d923a10a89785c75d3fb93949bd72b4332930efb /drivers/target/iscsi/iscsi_target_tmr.c | |
parent | bb7a8c8eb9678666fb05f3bc542581365399a161 (diff) | |
download | op-kernel-dev-998866b0740f128fd2c107c167c8385406dadae0.zip op-kernel-dev-998866b0740f128fd2c107c167c8385406dadae0.tar.gz |
iscsi-target: Fix potential deadlock on lock taken in timer
We need to disable BHs when taking sess_idr_lock because the
iscsit_handle_time2retain_timeout() timer function takes
se_tpg->session_lock, and iscsit_close_session() nests sess_idr_lock
inside se_tpg->session_lock. So if the timer can run inside
sess_idr_lock, we have a potential AB-BA deadlock.
Fix this by disabling BHs when taking sess_idr_lock. This was found
because of a lockdep warning, but it looks like a real (if highly
theoretical) deadlock. In any case avoiding lockdep spew so that we can
find other issues is a worthy cause.
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_tmr.c')
0 files changed, 0 insertions, 0 deletions