From: "Maurizio Lombardi" <mlombard@arkamax.eu>
To: "Bart Van Assche" <bvanassche@acm.org>,
"Maurizio Lombardi" <mlombard@redhat.com>,
<martin.petersen@oracle.com>
Cc: <mlombard@arkamax.eu>, <michael.christie@oracle.com>,
<target-devel@vger.kernel.org>, <loberman@redhat.com>
Subject: Re: [PATCH 1/1] target: iscsi: Fix hang for aborted WRITE_PENDING commands
Date: Mon, 20 Jul 2026 14:41:11 +0200 [thread overview]
Message-ID: <DK3EMOIBBYKX.2Q4JNOIUC58P@arkamax.eu> (raw)
In-Reply-To: <98f75887-2a0d-41aa-9dcc-0b891e84e912@acm.org>
On Fri Jul 17, 2026 at 6:38 PM CEST, Bart Van Assche wrote:
> On 7/17/26 7:38 AM, Maurizio Lombardi wrote:
>> When a LUN_RESET aborts a WRITE command that is in the
>> TRANSPORT_WRITE_PENDING state, the target core sets CMD_T_ABORTED and waits
>> for the frontend to finish processing.
>>
>> If the initiator subsequently sends the remaining dataout PDUs,
>> __iscsit_check_dataout_hdr() catches the payload, stops the dataout timer
>> if the sequence is final and finally dumps the data.
>> However, the iSCSI target doesn't trigger the completion process for these
>> aborted commands. Because of this, the abort path hangs indefinitely in
>> target_put_cmd_and_wait(), leading to a deadlocked target worker thread.
>>
>> Fix this by explicitly calling target_complete_cmd() when the final dataout
>> PDU is received for an aborted WRITE command. target_complete_cmd() detects
>> the CMD_T_ABORTED flag and cleanly routes the command into target_abort_work,
>> allowing the abort completion to successfully unblock.
>
> Shouldn't a Fixes: tag be added to this patch?
It's a bit difficult to pinpoint an exact commit.
Probably the roots of this bug could be found in aaa00cc93c1d0fd2693a ("scsi:
target/core: Fix TAS handling for aborted commands"), you are the author
of that commit btw.
But at the time (we are talking about 4.x kernels) the abort mechanism
was working in a different way, target_abort_work didn't even exists and
target_complete_cmd() was quite different...
Maurizio
next prev parent reply other threads:[~2026-07-20 12:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 14:38 [PATCH 0/1] Write commands abort hang Maurizio Lombardi
2026-07-17 14:38 ` [PATCH 1/1] target: iscsi: Fix hang for aborted WRITE_PENDING commands Maurizio Lombardi
2026-07-17 15:08 ` Laurence Oberman
2026-07-17 16:38 ` Bart Van Assche
2026-07-20 12:41 ` Maurizio Lombardi [this message]
2026-08-27 9:33 ` Dmitry Bogdanov
2026-08-27 10:37 ` Maurizio Lombardi
2026-08-29 2:19 ` Martin K. Petersen (Oracle)
2026-09-03 3:10 ` Martin K. Petersen (Oracle)
2026-08-27 7:30 ` [PATCH 0/1] Write commands abort hang Maurizio Lombardi
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=DK3EMOIBBYKX.2Q4JNOIUC58P@arkamax.eu \
--to=mlombard@arkamax.eu \
--cc=bvanassche@acm.org \
--cc=loberman@redhat.com \
--cc=martin.petersen@oracle.com \
--cc=michael.christie@oracle.com \
--cc=mlombard@redhat.com \
--cc=target-devel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.