mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Wagner <dwagner@suse.de>
To: WenTao Liang <vulab@iscas.ac.cn>
Cc: Ram Vegesna <ram.vegesna@broadcom.com>,
	 "James E . J . Bottomley"
	<James.Bottomley@hansenpartnership.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	 Vitaliy Shevtsov <v.shevtsov@mt-integration.ru>,
	Kees Cook <kees@kernel.org>, James Smart <jsmart2021@gmail.com>,
	 linux-scsi@vger.kernel.org, target-devel@vger.kernel.org,
	linux-kernel@vger.kernel.org,  stable@vger.kernel.org
Subject: Re: [PATCH] scsi: elx: efct: fix refcount leak in efct_hw_io_abort()
Date: Mon, 15 Jun 2026 11:35:25 +0200	[thread overview]
Message-ID: <b601d4e2-8b10-417d-8d4d-1c09e556e94a@flourine.local> (raw)
In-Reply-To: <20260611053037.63756-1-vulab@iscas.ac.cn>

On Thu, Jun 11, 2026 at 01:30:37PM +0800, WenTao Liang wrote:
> When efct_hw_reqtag_alloc() fails in efct_hw_io_abort(), the error
> path returns -ENOSPC without releasing the reference obtained via
> kref_get_unless_zero() earlier in the function. All other error
> paths correctly drop the reference. This causes a permanent
> reference leak on the io_to_abort object.
> 
> Additionally, the abort_in_progress flag is left set to true on
> this path, which means future abort attempts for the same I/O will
> immediately return -EINPROGRESS even though the abort was never
> submitted, effectively blocking recovery.
> 
> Fix this by adding the missing kref_put() call and reset
> abort_in_progress to false, matching the cleanup done in the
> efct_hw_wq_write() failure path below.
> 
> Cc: stable@vger.kernel.org
> Fixes: 63de51327a64 ("scsi: elx: efct: Hardware I/O and SGL initialization")
> Signed-off-by: WenTao Liang <vulab@iscas.ac.cn>

Looks good to me.

Reviewed-by: Daniel Wagner <dwagner@suse.de>

  reply	other threads:[~2026-06-15  9:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-11  5:30 WenTao Liang
2026-06-15  9:35 ` Daniel Wagner [this message]
2026-07-13  2:32 ` Martin K. Petersen

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=b601d4e2-8b10-417d-8d4d-1c09e556e94a@flourine.local \
    --to=dwagner@suse.de \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=jsmart2021@gmail.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=ram.vegesna@broadcom.com \
    --cc=stable@vger.kernel.org \
    --cc=target-devel@vger.kernel.org \
    --cc=v.shevtsov@mt-integration.ru \
    --cc=vulab@iscas.ac.cn \
    /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

all inboxes | Powered by JetHome®