linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.4 01/37] scsi: mpt3sas: Fix clear pending bit in ioctl status
@ 2019-12-11 15:37 Sasha Levin
  2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 02/37] scsi: lpfc: Fix locking on mailbox command completion Sasha Levin
                   ` (35 more replies)
  0 siblings, 36 replies; 42+ messages in thread
From: Sasha Levin @ 2019-12-11 15:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Sreekanth Reddy, Martin K . Petersen, Sasha Levin,
	MPT-FusionLinux.pdl, linux-scsi

From: Sreekanth Reddy <sreekanth.reddy@broadcom.com>

[ Upstream commit 782b281883caf70289ba6a186af29441a117d23e ]

When user issues diag register command from application with required size,
and if driver unable to allocate the memory, then it will fail the register
command. While failing the register command, driver is not currently
clearing MPT3_CMD_PENDING bit in ctl_cmds.status variable which was set
before trying to allocate the memory. As this bit is set, subsequent
register command will be failed with BUSY status even when user wants to
register the trace buffer will less memory.

Clear MPT3_CMD_PENDING bit in ctl_cmds.status before returning the diag
register command with no memory status.

Link: https://lore.kernel.org/r/1568379890-18347-4-git-send-email-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/scsi/mpt3sas/mpt3sas_ctl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
index 4ccde5a05b701..7874b989d2f4b 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
@@ -1456,7 +1456,8 @@ _ctl_diag_register_2(struct MPT3SAS_ADAPTER *ioc,
 			    " for diag buffers, requested size(%d)\n",
 			    ioc->name, __func__, request_data_sz);
 			mpt3sas_base_free_smid(ioc, smid);
-			return -ENOMEM;
+			rc = -ENOMEM;
+			goto out;
 		}
 		ioc->diag_buffer[buffer_type] = request_data;
 		ioc->diag_buffer_sz[buffer_type] = request_data_sz;
-- 
2.20.1


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

end of thread, other threads:[~2019-12-13  0:54 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-11 15:37 [PATCH AUTOSEL 4.4 01/37] scsi: mpt3sas: Fix clear pending bit in ioctl status Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 02/37] scsi: lpfc: Fix locking on mailbox command completion Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 03/37] Input: atmel_mxt_ts - disable IRQ across suspend Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 04/37] iommu/tegra-smmu: Fix page tables in > 4 GiB memory Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 05/37] scsi: target: compare full CHAP_A Algorithm strings Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 06/37] scsi: lpfc: Fix SLI3 hba in loop mode not discovering devices Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 07/37] scsi: csiostor: Don't enable IRQs too early Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 08/37] powerpc/pseries: Mark accumulate_stolen_time() as notrace Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 09/37] dma-debug: add a schedule point in debug_dma_dump_mappings() Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 10/37] clocksource/drivers/asm9260: Add a check for of_clk_get Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 11/37] powerpc/security/book3s64: Report L1TF status in sysfs Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 12/37] jbd2: Fix statistics for the number of logged blocks Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 13/37] scsi: tracing: Fix handling of TRANSFER LENGTH == 0 for READ(6) and WRITE(6) Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 14/37] scsi: lpfc: Fix duplicate unreg_rpi error in port offline flow Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 15/37] clk: qcom: Allow constant ratio freq tables for rcg Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 16/37] irqchip/irq-bcm7038-l1: Enable parent IRQ if necessary Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 17/37] irqchip: ingenic: Error out if IRQ domain creation failed Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 18/37] mfd: mfd-core: Honour Device Tree's request to disable a child-device Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 19/37] fs/quota: handle overflows of sysctl fs.quota.* and report as unsigned long Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 20/37] scsi: lpfc: fix: Coverity: lpfc_cmpl_els_rsp(): Null pointer dereferences Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 21/37] scsi: ufs: fix potential bug which ends in system hang Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 22/37] powerpc/pseries/cmm: Implement release() function for sysfs device Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 23/37] powerpc/security: Fix wrong message when RFI Flush is disable Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 24/37] clk: pxa: fix one of the pxa RTC clocks Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 25/37] bcache: at least try to shrink 1 node in bch_mca_scan() Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 26/37] HID: Improve Windows Precision Touchpad detection Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 27/37] ext4: work around deleting a file with i_nlink == 0 safely Sasha Levin
2019-12-11 16:19   ` Theodore Y. Ts'o
2019-12-11 18:25     ` Greg KH
2019-12-11 20:04     ` Sasha Levin
2019-12-12 15:17       ` Theodore Y. Ts'o
2019-12-13  0:54         ` Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 28/37] scsi: pm80xx: Fix for SATA device discovery Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 29/37] scsi: target: iscsi: Wait for all commands to finish before freeing a session Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 30/37] gpio: mpc8xxx: Don't overwrite default irq_set_type callback Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 31/37] scripts/kallsyms: fix definitely-lost memory leak Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 32/37] cdrom: respect device capabilities during opening action Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 33/37] perf regs: Make perf_reg_name() return "unknown" instead of NULL Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 34/37] libfdt: define INT32_MAX and UINT32_MAX in libfdt_env.h Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 35/37] s390/cpum_sf: Check for SDBT and SDB consistency Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 36/37] ocfs2: fix passing zero to 'PTR_ERR' warning Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 37/37] kernel: sysctl: make drop_caches write-only Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).