]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
stable fix for scsi patch for 4.14
authorSasha Levin <sashal@kernel.org>
Thu, 17 Jan 2019 20:50:44 +0000 (15:50 -0500)
committerSasha Levin <sashal@kernel.org>
Sat, 19 Jan 2019 01:59:06 +0000 (20:59 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.14/revert-scsi-target-iscsi-cxgbit-fix-csk-leak.patch [new file with mode: 0644]
queue-4.14/scsi-target-iscsi-cxgbit-fix-csk-leak-1.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/revert-scsi-target-iscsi-cxgbit-fix-csk-leak.patch b/queue-4.14/revert-scsi-target-iscsi-cxgbit-fix-csk-leak.patch
new file mode 100644 (file)
index 0000000..90fe305
--- /dev/null
@@ -0,0 +1,46 @@
+From 4bb30c1e245965cb699f92293bbb33fc1ee2c191 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 14 Jan 2019 10:01:30 -0500
+Subject: Revert "scsi: target: iscsi: cxgbit: fix csk leak"
+
+This reverts commit b831528038e3cad0d745c53bcaeedb642f5cbc1f.
+
+A wrong commit message was used for the stable commit because of a human
+error (and duplicate commit subject lines).
+
+This patch reverts this error, and the following patches add the two
+upstream commits.
+
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/target/iscsi/cxgbit/cxgbit_cm.c | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/drivers/target/iscsi/cxgbit/cxgbit_cm.c b/drivers/target/iscsi/cxgbit/cxgbit_cm.c
+index 0c00bb27c9c5..d4fa41be80f9 100644
+--- a/drivers/target/iscsi/cxgbit/cxgbit_cm.c
++++ b/drivers/target/iscsi/cxgbit/cxgbit_cm.c
+@@ -631,11 +631,8 @@ 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)
+@@ -1150,7 +1147,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, csk, cxgbit_arp_failure_discard);
++      t4_set_arp_err_handler(skb, NULL, cxgbit_arp_failure_discard);
+       cxgbit_l2t_send(csk->com.cdev, skb, csk->l2t);
+ }
+-- 
+2.19.1
+
diff --git a/queue-4.14/scsi-target-iscsi-cxgbit-fix-csk-leak-1.patch b/queue-4.14/scsi-target-iscsi-cxgbit-fix-csk-leak-1.patch
new file mode 100644 (file)
index 0000000..9f88e0c
--- /dev/null
@@ -0,0 +1,44 @@
+From eb98b064e206266b1f0f52720681425431f4506e Mon Sep 17 00:00:00 2001
+From: Varun Prakash <varun@chelsio.com>
+Date: Fri, 9 Nov 2018 20:59:01 +0530
+Subject: scsi: target: iscsi: cxgbit: fix csk leak
+
+[ Upstream commit ed076c55b359cc9982ca8b065bcc01675f7365f6 ]
+
+In case of arp failure call cxgbit_put_csk() to free csk.
+
+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 d4fa41be80f9..0c00bb27c9c5 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)
+@@ -1147,7 +1150,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
+
index 8d457cbb3dc8773ecfb781d458850a61f1311a53..000368c4aadc31ee3f5f2d6c03694e5c4ed0acc1 100644 (file)
@@ -6,3 +6,5 @@ can-gw-ensure-dlc-boundaries-after-can-frame-modification.patch
 mmc-sdhci-msm-disable-cdr-function-on-tx.patch
 media-em28xx-fix-misplaced-reset-of-dev-v4l-field_count.patch
 sched-fair-fix-bandwidth-timer-clock-drift-condition.patch
+revert-scsi-target-iscsi-cxgbit-fix-csk-leak.patch
+scsi-target-iscsi-cxgbit-fix-csk-leak-1.patch