From: <gregkh@linuxfoundation.org>
To: nab@linux-iscsi.org, gregkh@linuxfoundation.org, vst@datera.io
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "target: Re-add missing SCF_ACK_KREF assignment in v4.1.y" has been added to the 4.4-stable tree
Date: Wed, 26 Oct 2016 13:59:32 +0200 [thread overview]
Message-ID: <14774831721966@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
target: Re-add missing SCF_ACK_KREF assignment in v4.1.y
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
target-re-add-missing-scf_ack_kref-assignment-in-v4.1.y.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 527268df31e57cf2b6d417198717c6d6afdb1e3e Mon Sep 17 00:00:00 2001
From: Nicholas Bellinger <nab@linux-iscsi.org>
Date: Tue, 4 Oct 2016 16:37:05 -0700
Subject: target: Re-add missing SCF_ACK_KREF assignment in v4.1.y
From: Nicholas Bellinger <nab@linux-iscsi.org>
commit 527268df31e57cf2b6d417198717c6d6afdb1e3e upstream.
This patch fixes a regression in >= v4.1.y code where the original
SCF_ACK_KREF assignment in target_get_sess_cmd() was dropped upstream
in commit 054922bb, but the series for addressing TMR ABORT_TASK +
LUN_RESET with fabric session reinstatement in commit febe562c20 still
depends on this code in transport_cmd_finish_abort().
The regression manifests itself as a se_cmd->cmd_kref +1 leak, where
ABORT_TASK + LUN_RESET can hang indefinately for a specific I_T session
for drivers using SCF_ACK_KREF, resulting in hung kthreads.
This patch has been verified with v4.1.y code.
Reported-by: Vaibhav Tandon <vst@datera.io>
Tested-by: Vaibhav Tandon <vst@datera.io>
Cc: Vaibhav Tandon <vst@datera.io>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/target/target_core_transport.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -2509,8 +2509,10 @@ int target_get_sess_cmd(struct se_cmd *s
* fabric acknowledgement that requires two target_put_sess_cmd()
* invocations before se_cmd descriptor release.
*/
- if (ack_kref)
+ if (ack_kref) {
kref_get(&se_cmd->cmd_kref);
+ se_cmd->se_cmd_flags |= SCF_ACK_KREF;
+ }
spin_lock_irqsave(&se_sess->sess_cmd_lock, flags);
if (se_sess->sess_tearing_down) {
Patches currently in stable-queue which might be from nab@linux-iscsi.org are
queue-4.4/target-re-add-missing-scf_ack_kref-assignment-in-v4.1.y.patch
queue-4.4/target-don-t-override-extended_copy-xcopy_pt_cmd-scsi-status-code.patch
queue-4.4/target-make-extended_copy-0xe4-failure-return-copy-target-device-not-reachable.patch
reply other threads:[~2016-10-26 11:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=14774831721966@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=nab@linux-iscsi.org \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=vst@datera.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).