linux/drivers/target
Sebastian Andrzej Siewior 513e29946a scsi: target: core: Replace in_interrupt() usage in target_submit_cmd_map_sgls()
target_submit_cmd_map_sgls() uses in_interrupt() to crash if it returns
true.

The usage of in_interrupt() in drivers is phased out and Linus clearly
requested that code which changes behaviour depending on context should
either be separated or the context be conveyed in an argument passed by the
caller, which usually knows the context.

The usage of in_interrupt() is clearly for debugging. might_sleep() is
better at this because it also detects other contexts in which it is not
allowed to sleep, like preempt-disabled section.

Replace BUG_ON(in_interrupt) with might_sleep().

Link: https://lore.kernel.org/r/20201220203638.43615-6-bigeasy@linutronix.de
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-01-22 20:25:25 -05:00
..
iscsi scsi: target: iscsi: Redo iscsit_check_session_usage_count() return code 2021-01-22 20:25:25 -05:00
loopback scsi: tcm_loop: Allow queues, can_queue and cmd_per_lun to be settable 2020-11-04 22:39:38 -05:00
sbp treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
tcm_fc scsi: target: Make state_list per CPU 2020-11-04 22:39:38 -05:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile
target_core_alua.c scsi: target: alua: Remove in_interrupt() usage in core_alua_check_nonop_delay() 2021-01-22 20:25:25 -05:00
target_core_alua.h
target_core_configfs.c scsi: target: tcmu: Make pgr_support and alua_support attributes writable 2020-05-07 22:39:22 -04:00
target_core_device.c scsi: target: Make state_list per CPU 2020-11-04 22:39:38 -05:00
target_core_fabric_configfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
target_core_fabric_lib.c scsi: target: Handle short iSIDs 2020-07-08 00:14:34 -04:00
target_core_file.c scsi: target: file: Don't zero iter before iov_iter_bvec 2021-01-13 00:09:16 -05:00
target_core_file.h
target_core_hba.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
target_core_iblock.c scsi: target: core: Fix fall-through warnings for Clang 2020-12-02 12:59:47 -05:00
target_core_iblock.h
target_core_internal.h scsi: target: Fix xcopy sess release leak 2020-07-08 00:14:34 -04:00
target_core_pr.c scsi: target: core: Fix fall-through warnings for Clang 2020-12-02 12:59:47 -05:00
target_core_pr.h scsi: target/core: Rework the SPC-2 reservation handling code 2019-04-12 20:20:05 -04:00
target_core_pscsi.c block: remove the nr_sects field in struct hd_struct 2020-12-01 14:53:40 -07:00
target_core_pscsi.h
target_core_rd.c scsi: target: rd: Drop double zeroing 2020-10-07 23:50:03 -04:00
target_core_rd.h
target_core_sbc.c scsi: target: Return COMPARE AND WRITE miscompare offsets 2020-11-04 22:02:43 -05:00
target_core_spc.c scsi: target: use an enum to track emulate_ua_intlck_ctrl 2020-02-21 17:37:16 -05:00
target_core_stat.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
target_core_tmr.c scsi: target: Make state_list per CPU 2020-11-04 22:39:38 -05:00
target_core_tpg.c scsi: target: Drop sess_cmd_lock from I/O path 2020-11-04 22:39:37 -05:00
target_core_transport.c scsi: target: core: Replace in_interrupt() usage in target_submit_cmd_map_sgls() 2021-01-22 20:25:25 -05:00
target_core_ua.c scsi: target: use an enum to track emulate_ua_intlck_ctrl 2020-02-21 17:37:16 -05:00
target_core_ua.h
target_core_user.c SCSI misc on 20201216 2020-12-16 13:34:31 -08:00
target_core_xcopy.c scsi: target: Fix xcopy sess release leak 2020-07-08 00:14:34 -04:00
target_core_xcopy.h scsi: target: use the stack for XCOPY passthrough cmds 2020-03-29 18:10:59 -04:00