From: Nicholas Bellinger Date: Fri, 20 May 2011 03:19:10 +0000 (-0700) Subject: [SCSI] target: Fix interrupt context bug with stats_lock and core_tmr_alloc_req X-Git-Tag: v3.0-rc1~33^2~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53ab6709b4d35b1924240854d794482fd7d33d4a;p=pandora-kernel.git [SCSI] target: Fix interrupt context bug with stats_lock and core_tmr_alloc_req This patch fixes two bugs wrt to the interrupt context usage of target core with HW target mode drivers. It first converts the usage of struct se_device->stats_lock in transport_get_lun_for_cmd() and core_tmr_lun_reset() to properly use spin_lock_irq() to address an BUG with CONFIG_LOCKDEP_SUPPORT=y enabled. This patch also adds a 'in_interrupt()' check to allow GFP_ATOMIC usage from core_tmr_alloc_req() to fix a 'sleeping in interrupt context' BUG with HW target fabrics that require this logic to function. Signed-off-by: Nicholas Bellinger Cc: stable@kernel.org Signed-off-by: James Bottomley --- Reading git-diff-tree failed