Linux SCSI subsystem development
 help / color / mirror / Atom feed
* [bug report] scsi: core: Release SCSI devices synchronously
@ 2022-10-26 13:58 Dan Carpenter
  2022-10-26 18:39 ` Bart Van Assche
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2022-10-26 13:58 UTC (permalink / raw)
  To: bvanassche; +Cc: linux-scsi

Hello Bart Van Assche,

The patch f93ed747e2c7: "scsi: core: Release SCSI devices
synchronously" from Oct 14, 2022, leads to the following three Smatch
static checker warnings:

1) drivers/scsi/bfa/bfad_bsg.c:2551 bfad_iocmd_lunmask_reset_lunscan_mode() warn: sleeping in atomic context

bfad_iocmd_lunmask() <- disables preempt
-> bfad_iocmd_lunmask_reset_lunscan_mode()
   -> scsi_device_put()

(This is inside the calls to bfad_reset_sdev_bflags() macro).

2) drivers/scsi/device_handler/scsi_dh_alua.c:853 alua_rtpg_select_sdev() warn: sleeping in atomic context

alua_rtpg_work() <- disables preempt
-> alua_rtpg_select_sdev()
   -> scsi_device_put()

3) drivers/scsi/device_handler/scsi_dh_alua.c:1013 alua_rtpg_queue() warn: sleeping in atomic context

alua_check_vpd() <- disables preempt
-> alua_rtpg_queue()
   -> scsi_device_put()

Hopefully, this bug report is straight forward.  The fixes are probably
complicated though.  :P Basically the function marked "disables preempt"
takes a spin lock and calls the other function which calls
scsi_device_put().

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-26 18:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-26 13:58 [bug report] scsi: core: Release SCSI devices synchronously Dan Carpenter
2022-10-26 18:39 ` Bart Van Assche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox