]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] target: Fix interrupt context bug with stats_lock and core_tmr_alloc_req
authorNicholas Bellinger <nab@linux-iscsi.org>
Fri, 20 May 2011 03:19:10 +0000 (20:19 -0700)
committerJames Bottomley <jbottomley@parallels.com>
Tue, 24 May 2011 16:58:17 +0000 (12:58 -0400)
commit6a9add565906362a52e924a7082eb136d6e98a43
tree9a1b10d03d4c6aa91076dd6ea55a3874f0db590c
parent8c66821db9164e99a6fe45f4d1207632455d3dfd
[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 <nab@linux-iscsi.org>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <jbottomley@parallels.com>
drivers/target/target_core_device.c
drivers/target/target_core_tmr.c