[PATCH RESEND] qla2xxx: Fix gnl.l memory leak on adapter init failure

2019-08-14 Thread Bill Kuzeja
If HBA initialization fails unexpectedly (exiting via probe_failed:), we may fail to free vha->gnl.l. So that we don't attempt to double free, set this pointer to NULL after a free and check for NULL at probe_failed: so we know whether or not to call dma_free_coherent. Signed-off-

[PATCH] qla2xxx: Fix gnl.l memory leak on adapter init failure

2019-07-16 Thread Bill Kuzeja
If HBA initialization fails unexpectedly (exiting via probe_failed:), we may fail to free vha->gnl.l. So that we don't attempt to double free, set this pointer to NULL after a free and check for NULL at probe_failed: so we know whether or not to call dma_free_coherent. Signed-off-

[PATCH] qla2xxx: Fix panic in qla_dfs_tgt_counters_show

2019-03-04 Thread Bill Kuzeja
When trying to display tgt_counters in the debugfs, a panic can result. There is no null check for qpair after it is assigned in the for-loop. Unless vha->hw->queue_pair_map array is completely filled with entries, the system will panic dereferencing a null pointer. Signed-off-by: Bill

[PATCH] qla2xxx - Move debug messages before sending srb preventing panic

2019-02-14 Thread Bill Kuzeja
memory. This was partially fixed by (not every case was addressed): commit 9fe278f44b4b ("scsi: qla2xxx: Move log messages before issuing command to firmware") Signed-off-by: Bill Kuzeja --- drivers/scsi/qla2xxx/qla_gs.c | 66 ++- drivers/sc

[PATCH] Move debug messages before sending srb preventing panic

2019-02-14 Thread Bill Kuzeja
): commit 9fe278f44b4b ("scsi: qla2xxx: Move log messages before issuing command to firmware") Signed-off-by: Bill Kuzeja --- drivers/scsi/qla2xxx/qla_gs.c | 66 ++- drivers/scsi/qla2xxx/qla_init.c | 26 --- drivers/scsi/qla2xxx/qla_tar

[PATCH] Fix panic from use after free in qla2x00_async_tm_cmd

2019-02-12 Thread Bill Kuzeja
--- In qla2x00_async_tm_cmd, we reference off sp after it has been freed. This caused a panic on a system running a slub debug kernel. Since fcport is passed in anyways, just use that instead. Signed-off-by: Bill Kuzeja --- drivers/scsi/qla2xxx/qla_init.c | 4 ++-- 1 file changed, 2 insertions

[PATCH V2 RESEND] Timeouts occur on surprise removal of QLogic adapter

2018-11-05 Thread Bill Kuzeja
down chip") Signed-off-by: Bill Kuzeja --- Resending...can somebody review this (pretty please)?? After a hot remove of a Qlogic adapter, the driver's remove function gets called and we end up aborting all in progress I/Os. Here is the code flow: qla2x00_remove_one qla2x00_ab

[PATCH V2] Timeouts occur on surprise removal of QLogic adapter

2018-10-24 Thread Bill Kuzeja
down chip") Signed-off-by: Bill Kuzeja --- Note: (Reworked ACKed patch to cleanly apply to 4.20/scsi-queue as it stands today - please ignore patch I sent yesterday). Patch explanation: After a hot remove of a Qlogic adapter, the driver's remove function gets called and we end up

[PATCH RESEND] Timeouts occur on QLogic adapter surprise removal

2018-10-23 Thread Bill Kuzeja
When doing a surprise removal of an adapter, some in flight I/Os can get stuck and take a while to complete (they actually timeout and are retried). We are not handling an early error exit from qla2xxx_eh_abort properly. Fixes: 45235022da99 ("scsi: qla2xxx: Fix driver unload by shutting down ch

[PATCH RESEND] scsi: qla2xxx: I/Os timing out on surprise removal of

2018-10-16 Thread Bill Kuzeja
down chip") Signed-off-by: Bill Kuzeja --- (Originally sent on September 26th, no reply so resending.) After a hot remove of a Qlogic adapter, the driver's remove function gets called and we end up aborting all in progress I/Os. Here is the code flow: qla2x00_remove_one qla2x00_ab

[PATCH] scsi: qla2xxx: I/Os timing out on surprise removal of

2018-09-27 Thread Bill Kuzeja
chip") Signed-off-by: Bill Kuzeja --- When doing a sysfs remove of a QLogic adapter, the driver's remove function gets called and we end up aborting all in progress I/Os. Here is the code flow: qla2x00_remove_one qla2x00_abort_isp_cleanup qla2x00_abort_all_cmds __qla2x00

[PATCH] scsi: qla2xxx: Fix small memory leak in qla2x00_probe_one on probe failure

2018-03-23 Thread Bill Kuzeja
s: 6a2cf8d3663e ("scsi: qla2xxx: Fix crashes in qla2x00_probe_one on probe failure") Signed-off-by: Bill Kuzeja --- There is a small window in qla2x00_probe_one where if qla2x00_alloc_queues fails, we end up never freeing req and rsp and leak 0xc0 and 0xc8 bytes respectively (the

[PATCH V2] scsi: qla2xxx: Fix crashes in qla2x00_probe_one on probe failure

2018-03-04 Thread Bill Kuzeja
calls won't cause any harm. I also removed the problematic probe_init_failed exit point as it is not needed. Fixes: d64d6c5671db ("scsi: qla2xxx: Fix NULL pointer crash due to probe failure") Signed-off-by: Bill Kuzeja --- Some of these issues are due to: commit d64d6c5671db scs

[PATCH] scsi: qla2xxx: Fix crashes in qla2x00_probe_one on probe failure

2018-02-26 Thread Bill Kuzeja
ilure") Signed-off-by: Bill Kuzeja --- Some of these issues are due to: commit d64d6c5671db scsi: qla2xxx: Fix NULL pointer crash due to probe failure where some frees were moved around, as well as the error exit from a qla2x00_request_irqs failure. This was a fix for: commit d74595278f4a scs

[PATCH] scsi: SSDs can timeout during FS init because of too many unmaps

2017-09-19 Thread Bill Kuzeja
e expected since that's most likely the only time we'd be doing really large unmaps. Even so, the impact on FS init is fairly minimal, 10% for some models of SSDs, others no noticeable difference at all. Signed-off-by: Bill Kuzeja --- drivers/scsi/sd.c | 9 +++-- 1 file change

[PATCH] qla2xxx: Fix extraneous ref on sp's after adapter break

2017-05-25 Thread Bill Kuzeja
a board failure. Fixes: a465537ad1a4 ("qla2xxx: Disable the adapter and skip error recovery in case of register disconnect") Signed-off-by: Bill Kuzeja --- I encountered this hang during by adapter break testing (on Stratus hardware, we need to survive adapter breaks). I noticed th

[PATCH V2] qla2xxx: Fix crash in qla2xxx_eh_abort on bad ptr

2017-03-14 Thread Bill Kuzeja
ing it out), so I can verify that this fix works. My testing has been against a RHEL7 driver variant, but the bug and patch are equally relevant to to the upstream driver. Fixes: 1535aa75a3d8 ("scsi: qla2xxx: fix invalid DMA access after command aborts in PCI device remove") Signed-off-b

[PATCH] qla2xxx: Fix crash in qla2xxx_eh_abort on bad ptr

2017-03-09 Thread Bill Kuzeja
and safer change. This problem is hard to hit, but I have run into it doing negative testing many times now (with a test specifically designed to bring it out), so I can verify that this fix works. My testing has been against a RHEL7 driver variant, but the bug and patch are equally relevant to t

[PATCH] qla2xxx: Fix scsi scan hang triggered if adapter fails during init

2016-10-21 Thread Bill Kuzeja
negative testing many times now (with a test specifically designed to bring it out), so I can verify that this fix works. My testing has been against a RHEL7 driver variant, but the bug and patch are equally relevant to to the upstream driver. Fixes: beb9e315e6e0 ("qla2xxx: Prevent removal and boa