linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.19 22/97] Revert "scsi: qla2xxx: Fix NVMe Target discovery"
       [not found] <20181226223557.149329-1-sashal@kernel.org>
@ 2018-12-26 22:34 ` Sasha Levin
  2018-12-26 22:34 ` [PATCH AUTOSEL 4.19 23/97] scsi: bnx2fc: Fix NULL dereference in error handling Sasha Levin
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2018-12-26 22:34 UTC (permalink / raw)
  To: stable, linux-kernel
  Cc: Himanshu Madhani, Martin K . Petersen, Sasha Levin, linux-scsi

From: Himanshu Madhani <hmadhani@marvell.com>

[ Upstream commit c64a87f9518409d0a439895f09f6149ffdd427b8 ]

This reverts commit db186382af21e926e90df19499475f2552192b77.

This commit introduced regression with FCP discovery so revert it to fix
discovery for FCP luns.

Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/scsi/qla2xxx/qla_os.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index ae9fd2d01004..42b8f0d3e580 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -4808,10 +4808,10 @@ void qla24xx_create_new_sess(struct scsi_qla_host *vha, struct qla_work_evt *e)
 			fcport->d_id = e->u.new_sess.id;
 			fcport->flags |= FCF_FABRIC_DEVICE;
 			fcport->fw_login_state = DSC_LS_PLOGI_PEND;
-			if (e->u.new_sess.fc4_type & FS_FC4TYPE_FCP)
+			if (e->u.new_sess.fc4_type == FS_FC4TYPE_FCP)
 				fcport->fc4_type = FC4_TYPE_FCP_SCSI;
 
-			if (e->u.new_sess.fc4_type & FS_FC4TYPE_NVME) {
+			if (e->u.new_sess.fc4_type == FS_FC4TYPE_NVME) {
 				fcport->fc4_type = FC4_TYPE_OTHER;
 				fcport->fc4f_nvme = FC4_TYPE_NVME;
 			}
-- 
2.19.1

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

* [PATCH AUTOSEL 4.19 23/97] scsi: bnx2fc: Fix NULL dereference in error handling
       [not found] <20181226223557.149329-1-sashal@kernel.org>
  2018-12-26 22:34 ` [PATCH AUTOSEL 4.19 22/97] Revert "scsi: qla2xxx: Fix NVMe Target discovery" Sasha Levin
@ 2018-12-26 22:34 ` Sasha Levin
  2018-12-26 22:35 ` [PATCH AUTOSEL 4.19 41/97] scsi: target: iscsi: cxgbit: fix csk leak Sasha Levin
  2018-12-26 22:35 ` [PATCH AUTOSEL 4.19 42/97] scsi: target: iscsi: cxgbit: add missing spin_lock_init() Sasha Levin
  3 siblings, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2018-12-26 22:34 UTC (permalink / raw)
  To: stable, linux-kernel
  Cc: Dan Carpenter, Martin K . Petersen, Sasha Levin, linux-scsi

From: Dan Carpenter <dan.carpenter@oracle.com>

[ Upstream commit 9ae4f8420ed7be4b13c96600e3568c144d101a23 ]

If "interface" is NULL then we can't release it and trying to will only
lead to an Oops.

Fixes: aea71a024914 ("[SCSI] bnx2fc: Introduce interface structure for each vlan interface")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index f00045813378..3f97ec4aac4b 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -2371,7 +2371,7 @@ static int _bnx2fc_create(struct net_device *netdev,
 	if (!interface) {
 		printk(KERN_ERR PFX "bnx2fc_interface_create failed\n");
 		rc = -ENOMEM;
-		goto ifput_err;
+		goto netdev_err;
 	}
 
 	if (is_vlan_dev(netdev)) {
-- 
2.19.1

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

* [PATCH AUTOSEL 4.19 41/97] scsi: target: iscsi: cxgbit: fix csk leak
       [not found] <20181226223557.149329-1-sashal@kernel.org>
  2018-12-26 22:34 ` [PATCH AUTOSEL 4.19 22/97] Revert "scsi: qla2xxx: Fix NVMe Target discovery" Sasha Levin
  2018-12-26 22:34 ` [PATCH AUTOSEL 4.19 23/97] scsi: bnx2fc: Fix NULL dereference in error handling Sasha Levin
@ 2018-12-26 22:35 ` Sasha Levin
  2018-12-26 22:35 ` [PATCH AUTOSEL 4.19 42/97] scsi: target: iscsi: cxgbit: add missing spin_lock_init() Sasha Levin
  3 siblings, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2018-12-26 22:35 UTC (permalink / raw)
  To: stable, linux-kernel
  Cc: Varun Prakash, Martin K . Petersen, Sasha Levin, linux-scsi,
	target-devel

From: Varun Prakash <varun@chelsio.com>

[ Upstream commit 801df68d617e3cb831f531c99fa6003620e6b343 ]

csk leak can happen if a new TCP connection gets established after
cxgbit_accept_np() returns, to fix this leak free remaining csk in
cxgbit_free_np().

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/target/iscsi/cxgbit/cxgbit_cm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/target/iscsi/cxgbit/cxgbit_cm.c b/drivers/target/iscsi/cxgbit/cxgbit_cm.c
index 8de16016b6de..b289b90ae6dc 100644
--- a/drivers/target/iscsi/cxgbit/cxgbit_cm.c
+++ b/drivers/target/iscsi/cxgbit/cxgbit_cm.c
@@ -631,8 +631,11 @@ static void cxgbit_send_halfclose(struct cxgbit_sock *csk)
 
 static void cxgbit_arp_failure_discard(void *handle, struct sk_buff *skb)
 {
+	struct cxgbit_sock *csk = handle;
+
 	pr_debug("%s cxgbit_device %p\n", __func__, handle);
 	kfree_skb(skb);
+	cxgbit_put_csk(csk);
 }
 
 static void cxgbit_abort_arp_failure(void *handle, struct sk_buff *skb)
@@ -1190,7 +1193,7 @@ cxgbit_pass_accept_rpl(struct cxgbit_sock *csk, struct cpl_pass_accept_req *req)
 	rpl5->opt0 = cpu_to_be64(opt0);
 	rpl5->opt2 = cpu_to_be32(opt2);
 	set_wr_txq(skb, CPL_PRIORITY_SETUP, csk->ctrlq_idx);
-	t4_set_arp_err_handler(skb, NULL, cxgbit_arp_failure_discard);
+	t4_set_arp_err_handler(skb, csk, cxgbit_arp_failure_discard);
 	cxgbit_l2t_send(csk->com.cdev, skb, csk->l2t);
 }
 
-- 
2.19.1

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

* [PATCH AUTOSEL 4.19 42/97] scsi: target: iscsi: cxgbit: add missing spin_lock_init()
       [not found] <20181226223557.149329-1-sashal@kernel.org>
                   ` (2 preceding siblings ...)
  2018-12-26 22:35 ` [PATCH AUTOSEL 4.19 41/97] scsi: target: iscsi: cxgbit: fix csk leak Sasha Levin
@ 2018-12-26 22:35 ` Sasha Levin
  3 siblings, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2018-12-26 22:35 UTC (permalink / raw)
  To: stable, linux-kernel
  Cc: Varun Prakash, Martin K . Petersen, Sasha Levin, linux-scsi,
	target-devel

From: Varun Prakash <varun@chelsio.com>

[ Upstream commit 9e6371d3c6913ff1707fb2c0274c9925f7aaef80 ]

Add missing spin_lock_init() for cdev->np_lock.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/target/iscsi/cxgbit/cxgbit_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/target/iscsi/cxgbit/cxgbit_main.c b/drivers/target/iscsi/cxgbit/cxgbit_main.c
index f3f8856bfb68..c011c826fc26 100644
--- a/drivers/target/iscsi/cxgbit/cxgbit_main.c
+++ b/drivers/target/iscsi/cxgbit/cxgbit_main.c
@@ -58,6 +58,7 @@ static void *cxgbit_uld_add(const struct cxgb4_lld_info *lldi)
 		return ERR_PTR(-ENOMEM);
 
 	kref_init(&cdev->kref);
+	spin_lock_init(&cdev->np_lock);
 
 	cdev->lldi = *lldi;
 
-- 
2.19.1

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

end of thread, other threads:[~2018-12-26 22:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20181226223557.149329-1-sashal@kernel.org>
2018-12-26 22:34 ` [PATCH AUTOSEL 4.19 22/97] Revert "scsi: qla2xxx: Fix NVMe Target discovery" Sasha Levin
2018-12-26 22:34 ` [PATCH AUTOSEL 4.19 23/97] scsi: bnx2fc: Fix NULL dereference in error handling Sasha Levin
2018-12-26 22:35 ` [PATCH AUTOSEL 4.19 41/97] scsi: target: iscsi: cxgbit: fix csk leak Sasha Levin
2018-12-26 22:35 ` [PATCH AUTOSEL 4.19 42/97] scsi: target: iscsi: cxgbit: add missing spin_lock_init() 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).