linux/drivers/scsi
Manish Rangankar 76f480d7c7 scsi: qla2xxx: During vport delete send async logout explicitly
During vport delete, it is observed that during unload we hit a crash
because of stale entries in outstanding command array.  For all these stale
I/O entries, eh_abort was issued and aborted (fast_fail_io = 2009h) but
I/Os could not complete while vport delete is in process of deleting.

  BUG: kernel NULL pointer dereference, address: 000000000000001c
  #PF: supervisor read access in kernel mode
  #PF: error_code(0x0000) - not-present page
  PGD 0 P4D 0
  Oops: 0000 [#1] PREEMPT SMP NOPTI
  Workqueue: qla2xxx_wq qla_do_work [qla2xxx]
  RIP: 0010:dma_direct_unmap_sg+0x51/0x1e0
  RSP: 0018:ffffa1e1e150fc68 EFLAGS: 00010046
  RAX: 0000000000000000 RBX: 0000000000000021 RCX: 0000000000000001
  RDX: 0000000000000021 RSI: 0000000000000000 RDI: ffff8ce208a7a0d0
  RBP: ffff8ce208a7a0d0 R08: 0000000000000000 R09: ffff8ce378aac9c8
  R10: ffff8ce378aac8a0 R11: ffffa1e1e150f9d8 R12: 0000000000000000
  R13: 0000000000000000 R14: ffff8ce378aac9c8 R15: 0000000000000000
  FS:  0000000000000000(0000) GS:ffff8d217f000000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: 000000000000001c CR3: 0000002089acc000 CR4: 0000000000350ee0
  Call Trace:
  <TASK>
  qla2xxx_qpair_sp_free_dma+0x417/0x4e0
  ? qla2xxx_qpair_sp_compl+0x10d/0x1a0
  ? qla2x00_status_entry+0x768/0x2830
  ? newidle_balance+0x2f0/0x430
  ? dequeue_entity+0x100/0x3c0
  ? qla24xx_process_response_queue+0x6a1/0x19e0
  ? __schedule+0x2d5/0x1140
  ? qla_do_work+0x47/0x60
  ? process_one_work+0x267/0x440
  ? process_one_work+0x440/0x440
  ? worker_thread+0x2d/0x3d0
  ? process_one_work+0x440/0x440
  ? kthread+0x156/0x180
  ? set_kthread_struct+0x50/0x50
  ? ret_from_fork+0x22/0x30
  </TASK>

Send out async logout explicitly for all the ports during vport delete.

Cc: stable@vger.kernel.org
Signed-off-by: Manish Rangankar <mrangankar@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20240710171057.35066-8-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2024-07-10 22:44:10 -04:00
..
aacraid scsi: aacraid: aachba: Replace snprintf() with the safer scnprintf() variant 2024-01-29 20:34:52 -05:00
aic7xxx Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
aic94xx Merge patch series "Add LIBSAS_SHT_BASE for libsas" 2024-03-25 16:09:36 -04:00
arcmsr scsi: arcmsr: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY 2024-05-16 14:35:08 -05:00
arm scsi: powertec: Declare SCSI host template const 2023-03-24 19:19:21 -04:00
be2iscsi scsi: be2iscsi: Fix a memleak in beiscsi_init_wrb_handle() 2023-12-05 20:38:26 -05:00
bfa Driver core changes for 6.10-rc1 2024-05-22 12:13:40 -07:00
bnx2fc SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
bnx2i scsi: bnx2i: Replace all non-returning strlcpy with strscpy 2023-05-26 13:52:19 -07:00
csiostor scsi: csiostor: Drop driver owner assignment 2024-04-05 20:52:49 -04:00
cxgbi scsi: cxgbi: Fix 'generated' typo 2023-10-13 14:15:54 -04:00
cxlflash scsi: cxlflash: Fix function pointer cast warnings 2024-04-08 15:08:52 -04:00
device_handler scsi: device_handler: rdac: Have midlayer retry send_mode_select() errors 2024-01-29 21:20:53 -05:00
elx scsi: elx: libefc: Replace deprecated strncpy() with strscpy_pad()/memcpy() 2023-11-15 09:46:03 -05:00
esas2r scsi: esas2r: Use FIELD_GET() to extract PCIe capability fields 2023-09-13 21:01:59 -04:00
fcoe SCSI misc on 20240316 2024-03-16 16:31:12 -07:00
fnic SCSI misc on 20240316 2024-03-16 16:31:12 -07:00
hisi_sas SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
ibmvscsi scsi: scsi_transport_fc: Add a max_bsg_segments field to struct fc_function_template 2024-04-11 21:37:48 -04:00
ibmvscsi_tgt scsi: Use device_show_string() helper for sysfs attributes 2024-05-04 17:37:04 +02:00
isci Merge patch series "Add LIBSAS_SHT_BASE for libsas" 2024-03-25 16:09:36 -04:00
libfc scsi: libfc: replace deprecated strncpy() with memcpy() 2024-02-26 21:21:23 -05:00
libsas SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
lpfc Merge patch series "Update lpfc to revision 14.4.0.2" 2024-05-06 21:56:00 -04:00
megaraid pci-v6.10-changes 2024-05-21 10:09:28 -07:00
mpi3mr The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
mpt3sas pci-v6.10-changes 2024-05-21 10:09:28 -07:00
mvsas Driver core changes for 6.10-rc1 2024-05-22 12:13:40 -07:00
pcmcia scsi: Add HAS_IOPORT dependencies 2023-05-31 19:59:26 -04:00
pm8001 Merge patch series "Add LIBSAS_SHT_BASE for libsas" 2024-03-25 16:09:36 -04:00
qedf scsi: qedf: Ensure the copied buf is NUL terminated 2024-05-06 21:19:24 -04:00
qedi scsi: qedi: Fix crash while reading debugfs attribute 2024-04-24 21:09:08 -04:00
qla2xxx scsi: qla2xxx: During vport delete send async logout explicitly 2024-07-10 22:44:10 -04:00
qla4xxx scsi: qla4xxx: Replace deprecated strncpy() with strscpy() 2024-03-10 18:37:43 -04:00
smartpqi Driver core changes for 6.10-rc1 2024-05-22 12:13:40 -07:00
snic scsi: snic: Convert sprintf() family to sysfs_emit() family 2024-04-08 22:04:32 -04:00
sym53c8xx_2 scsi: sym53c8xx_2: Rework reset handling 2023-10-13 14:23:15 -04:00
.gitignore
3w-9xxx.c scsi: 3w-9xxx: Remove snprintf() from sysfs call-backs and replace with sysfs_emit() 2024-01-29 20:34:52 -05:00
3w-9xxx.h
3w-sas.c scsi: 3w-sas: Remove snprintf() from sysfs call-backs and replace with sysfs_emit() 2024-01-29 20:34:52 -05:00
3w-sas.h scsi: 3w-sas: Replace 1-element arrays with flexible array members 2023-01-12 00:09:52 -05:00
3w-xxxx.c scsi: 3w-xxxx: Remove snprintf() from sysfs call-backs and replace with sysfs_emit() 2024-01-29 20:34:52 -05:00
3w-xxxx.h
53c700_d.h_shipped
53c700.c scsi: 53c700: Remove snprintf() from sysfs call-backs and replace with sysfs_emit() 2024-01-29 20:34:52 -05:00
53c700.h
53c700.scr
a100u2w.c scsi: a100u2w: Declare SCSI host template const 2023-03-24 19:19:20 -04:00
a100u2w.h
a2091.c scsi: a2091: Declare SCSI host template const 2023-03-24 19:19:20 -04:00
a2091.h
a3000.c scsi: a3000: Mark driver struct with __refdata to prevent section mismatch 2024-04-05 21:11:44 -04:00
a3000.h
a4000t.c scsi: a4000t: Mark driver struct with __refdata to prevent section mismatch 2024-04-05 21:11:44 -04:00
advansys.c scsi: advansys: Declare SCSI host template const 2023-03-24 19:19:20 -04:00
aha152x.c scsi: core: Add a no_highmem flag to struct Scsi_Host 2024-04-11 21:37:48 -04:00
aha152x.h
aha1542.c scsi: aha1542: Declare SCSI host template const 2023-03-24 19:19:21 -04:00
aha1542.h
aha1740.c scsi: aha1740: Declare SCSI host template const 2023-03-24 19:19:21 -04:00
aha1740.h
am53c974.c scsi: esp_scsi: Declare SCSI host template const 2023-03-24 19:19:22 -04:00
atari_scsi.c scsi: atari_scsi: Mark driver struct with __refdata to prevent section mismatch 2024-04-05 21:11:44 -04:00
atp870u.c scsi: atp870u: Declare SCSI host template const 2023-03-24 19:19:21 -04:00
atp870u.h
BusLogic.c scsi: BusLogic: Declare SCSI host template const 2023-03-24 19:19:20 -04:00
BusLogic.h
bvme6000_scsi.c scsi: bvme6000: Convert to platform remove callback returning void 2023-12-05 21:51:36 -05:00
ch.c scsi: ch: Make ch_sysfs_class constant 2024-03-10 18:15:48 -04:00
constants.c
dc395x.c scsi: dc395x: Fix warning using plain integer as NULL 2023-11-24 21:08:23 -05:00
dc395x.h
dmx3191d.c scsi: dmx3191d: Declare SCSI host template const 2023-03-24 19:19:22 -04:00
esp_scsi.c Normalise "name (ad@dr)" MODULE_AUTHORs to "name <ad@dr>" 2024-03-06 13:07:39 -08:00
esp_scsi.h scsi: esp_scsi: Declare SCSI host template const 2023-03-24 19:19:22 -04:00
fdomain_isa.c
fdomain_pci.c
fdomain.c scsi: fdomain: Declare SCSI host template const 2023-03-24 19:19:22 -04:00
fdomain.h
FlashPoint.c scsi: FlashPoint: Remove redundant assignment to pointer currTar_Info 2024-04-08 22:01:19 -04:00
g_NCR5380.c scsi: NCR5380: Declare SCSI host template const 2023-03-24 19:19:22 -04:00
gvp11.c scsi: gvp11: Remove unused gvp11_setup() function 2023-08-21 16:37:11 -04:00
gvp11.h
hosts.c SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
hpsa_cmd.h
hpsa.c pci-v6.10-changes 2024-05-21 10:09:28 -07:00
hpsa.h
hptiop.c scsi: hptiop: Switch to using ->device_configure 2024-04-11 21:37:49 -04:00
hptiop.h
imm.c scsi: core: Add a no_highmem flag to struct Scsi_Host 2024-04-11 21:37:48 -04:00
imm.h scsi: imm: Add a module parameter for the transfer mode 2023-09-13 21:11:55 -04:00
initio.c scsi: initio: Remove redundant variable 'rb' 2024-01-17 14:49:05 -05:00
initio.h
ipr.c pci-v6.10-changes 2024-05-21 10:09:28 -07:00
ipr.h scsi: ipr: Remove SATA support 2023-04-18 23:01:23 -04:00
ips.c scsi: ips: Do not try to abort command from host reset 2023-10-13 14:23:15 -04:00
ips.h
iscsi_boot_sysfs.c
iscsi_tcp.c scsi: core: Add a dma_alignment field to the host and host template 2024-04-11 21:37:48 -04:00
iscsi_tcp.h scsi: iscsi_tcp: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage 2023-06-24 15:50:13 -07:00
jazz_esp.c Normalise "name (ad@dr)" MODULE_AUTHORs to "name <ad@dr>" 2024-03-06 13:07:39 -08:00
Kconfig scsi: qla2xxx: Indent help text 2024-04-08 22:01:19 -04:00
lasi700.c
libiscsi_tcp.c
libiscsi.c scsi: iscsi: Declare SCSI host template const 2023-03-24 19:19:57 -04:00
mac53c94.c powerpc/macio: Make remove callback of macio driver void returned 2024-03-07 23:06:19 +11:00
mac53c94.h
mac_esp.c scsi: mac_esp: Convert to platform remove callback returning void 2023-12-05 21:51:37 -05:00
mac_scsi.c scsi: mac_scsi: Mark driver struct with __refdata to prevent section mismatch 2024-04-05 21:11:44 -04:00
Makefile scsi: scsi_proto: Add structures and constants related to I/O groups and streams 2024-02-26 21:37:26 -05:00
megaraid.c scsi: megaraid: Remove redundant assignment to variable 'retval' 2024-01-23 21:38:18 -05:00
megaraid.h
mesh.c powerpc updates for 6.9 2024-03-15 17:53:48 -07:00
mesh.h
mvme16x_scsi.c scsi: mvme16x: Convert to platform remove callback returning void 2023-12-05 21:51:37 -05:00
mvme147.c scsi: mvme147: Declare SCSI host template const 2023-03-24 19:19:57 -04:00
mvme147.h
mvumi.c scsi: core: Improve type safety of scsi_rescan_device() 2023-08-24 22:11:29 -04:00
mvumi.h scsi: mvumi: Replace 1-element arrays with flexible array members 2023-01-12 00:11:11 -05:00
myrb.c scsi: mylex: Fix sysfs buffer lengths 2024-04-01 21:08:48 -04:00
myrb.h
myrs.c scsi: mylex: Fix sysfs buffer lengths 2024-04-01 21:08:48 -04:00
myrs.h
ncr53c8xx.c scsi: ncr53c8xx: Replace strlcpy() with strscpy() 2023-06-21 21:13:00 -04:00
ncr53c8xx.h
NCR5380.c scsi: NCR5380: Use default @max_active for hostdata->work_q 2023-05-22 15:13:03 -10:00
NCR5380.h
nsp32_debug.c
nsp32_io.h
nsp32.c scsi: nsp32: Declare SCSI host template const 2023-03-24 19:19:58 -04:00
nsp32.h
pmcraid.c pci-v6.10-changes 2024-05-21 10:09:28 -07:00
pmcraid.h
ppa.c scsi: core: Add a no_highmem flag to struct Scsi_Host 2024-04-11 21:37:48 -04:00
ppa.h scsi: ppa: Add a module parameter for the transfer mode 2023-08-21 16:32:40 -04:00
ps3rom.c scsi: ps3rom: Declare SCSI host template const 2023-03-24 19:19:58 -04:00
qla1280.c scsi: qla1280: Remove redundant assignment to variable 'mr' 2024-02-15 15:09:09 -05:00
qla1280.h
qlogicfas408.c
qlogicfas408.h
qlogicfas.c
qlogicpti.c Normalise "name (ad@dr)" MODULE_AUTHORs to "name <ad@dr>" 2024-03-06 13:07:39 -08:00
qlogicpti.h
raid_class.c scsi: core: raid_class: Remove raid_component_add() 2023-08-24 21:34:28 -04:00
script_asm.pl
scsi_bsg.c scsi: replace the fmode_t argument to ->sg_io_fn with a simple bool 2023-06-12 08:04:04 -06:00
scsi_common.c scsi: core: Use min() instead of open-coding it 2023-05-31 11:05:34 -04:00
scsi_debug.c SCSI misc on 20240322 2024-03-22 13:31:07 -07:00
scsi_debugfs.c scsi: core: Improve the code for showing commands in debugfs 2024-04-08 22:12:33 -04:00
scsi_debugfs.h
scsi_devinfo.c scsi: devinfo: Replace strncpy() and manual pad 2024-03-10 18:37:43 -04:00
scsi_dh.c
scsi_error.c scsi: core: Move scsi_host_busy() out of host lock if it is for per-command 2024-02-05 16:15:20 -05:00
scsi_ioctl.c scsi: replace the fmode_t argument to scsi_ioctl with a simple bool 2023-06-12 08:04:04 -06:00
scsi_lib_dma.c
scsi_lib_test.c scsi: core: Add kunit tests for scsi_check_passthrough() 2024-01-29 21:20:55 -05:00
scsi_lib.c SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
scsi_logging.c
scsi_logging.h
scsi_netlink.c
scsi_pm.c
scsi_priv.h SCSI misc on 20240316 2024-03-16 16:31:12 -07:00
scsi_proc.c scsi: core: Fix legacy /proc parsing buffer overflow 2023-07-31 15:39:39 -04:00
scsi_proto_test.c scsi: scsi_proto: Add structures and constants related to I/O groups and streams 2024-02-26 21:37:26 -05:00
scsi_sas_internal.h
scsi_scan.c SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
scsi_sysctl.c scsi: Remove now superfluous sentinel element from ctl_table array 2023-10-11 12:16:13 -07:00
scsi_sysfs.c scsi: core: Store owner from modules with scsi_register_driver() 2024-04-05 20:58:25 -04:00
scsi_trace.c
scsi_transport_api.h
scsi_transport_fc.c scsi: scsi_transport_fc: Add a max_bsg_segments field to struct fc_function_template 2024-04-11 21:37:48 -04:00
scsi_transport_iscsi.c scsi: iscsi: Remove unused list 'connlist_err' 2024-05-06 21:39:32 -04:00
scsi_transport_sas.c scsi: bsg: Pass queue_limits to bsg_setup_queue() 2024-04-11 21:37:48 -04:00
scsi_transport_spi.c scsi: spi: Have midlayer retry spi_execute() UAs 2024-01-29 21:20:53 -05:00
scsi_transport_srp.c scsi: core: Replace scsi_target_block() with scsi_block_targets() 2023-06-16 12:19:59 -04:00
scsi.c SCSI misc on 20240322 2024-03-22 13:31:07 -07:00
scsicam.c use ->bd_mapping instead of ->bd_inode->i_mapping 2024-05-03 02:36:51 -04:00
sd_dif.c scsi: sd: Update DIX config every time sd_revalidate_disk() is called 2023-02-21 22:00:32 -05:00
sd_trace.h scsi: sd: sd_zbc: Trace zone append emulation 2022-12-01 03:13:55 +00:00
sd_zbc.c block: Simplify blk_revalidate_disk_zones() interface 2024-04-17 08:44:03 -06:00
sd.c SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
sd.h scsi: sd: Use the block layer zone append emulation 2024-04-17 08:44:03 -06:00
sense_codes.h
ses.c scsi: ses: Drop driver owner initialization 2024-04-05 20:58:25 -04:00
sg.c scsi: sg: Avoid race in error handling & drop bogus warn 2024-04-04 18:22:12 -04:00
sgiwd93.c scsi: sgiwd93: Convert to platform remove callback returning void 2023-12-05 21:51:37 -05:00
sim710.c
sni_53c710.c scsi: sni_53c710: Convert to platform remove callback returning void 2023-12-05 21:51:37 -05:00
sr_ioctl.c scsi: sr: Convert to scsi_execute_cmd() 2023-01-13 21:34:09 -05:00
sr_vendor.c
sr.c scsi: sr: Drop driver owner initialization 2024-04-05 20:58:25 -04:00
sr.h
st_options.h
st.c scsi: st: Drop driver owner initialization 2024-04-05 20:58:25 -04:00
st.h
stex.c scsi: stex: Fix gcc 13 warnings 2023-05-31 11:36:40 -04:00
storvsc_drv.c scsi: storvsc: Fix ring buffer size calculation 2024-01-23 21:27:28 -05:00
sun3_scsi_vme.c
sun3_scsi.c scsi: sun3: Convert to platform remove callback returning void 2023-12-05 21:51:37 -05:00
sun3x_esp.c Normalise "name (ad@dr)" MODULE_AUTHORs to "name <ad@dr>" 2024-03-06 13:07:39 -08:00
sun_esp.c Normalise "name (ad@dr)" MODULE_AUTHORs to "name <ad@dr>" 2024-03-06 13:07:39 -08:00
virtio_scsi.c scsi: virtio: drop owner assignment 2024-05-22 08:31:18 -04:00
vmw_pvscsi.c scsi: vmw_pvscsi: Do not use PCI_IRQ_LEGACY instead of PCI_IRQ_LEGACY 2024-05-16 14:35:08 -05:00
vmw_pvscsi.h
wd33c93.c scsi: wd33c93: Replace deprecated strncpy() with strscpy() 2024-03-10 18:37:43 -04:00
wd33c93.h
wd719x.c scsi: wd719x: Declare SCSI host template const 2023-03-24 19:19:59 -04:00
wd719x.h
xen-scsifront.c scsi: xen-scsifront: shost_priv() can never return NULL 2023-08-24 22:06:44 -04:00
zalon.c
zorro7xx.c
zorro_esp.c scsi: esp_scsi: Declare SCSI host template const 2023-03-24 19:19:22 -04:00