From: Roland Dreier Date: Tue, 6 Nov 2012 02:02:40 +0000 (-0800) Subject: iscsi-target: Fix potential deadlock on lock taken in timer X-Git-Tag: v3.8-rc1~94^2~29 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=998866b0740f128fd2c107c167c8385406dadae0;p=pandora-kernel.git 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 Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed