Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: David Strahan <david.strahan@microchip.com>
To: <sashiko-bot@kernel.org>
Cc: <linux-scsi@vger.kernel.org>,
	David Strahan <david.strahan@microchip.com>
Subject: Re: [PATCH v1 1/4] smartpqi: Fix AIO retry marker cleared by SCSI core between dispatches.
Date: Mon, 27 Jul 2026 14:55:47 -0500	[thread overview]
Message-ID: <20260727195547.19480-1-david.strahan@microchip.com> (raw)
In-Reply-To: <20260722220401.6357-1-david.strahan@microchip.com>

Re: commit 594ef5db683084e131dde7930f0e556c7584b609
    [PATCH v1 1/4] smartpqi: Fix AIO retry marker cleared by SCSI core
    between dispatches.

Link: https://lore.kernel.org/linux-scsi/20260722220401.6357-1-david.strahan@microchip.com/

Sashiko AI review (https://sashiko.dev/#/patchset/20260722220401.6357-1-david.strahan@microchip.com?part=1):

> [Severity: High]
> State leakage across blk-mq tag reuse leads to erroneous drive
> offlining. [...] If a command is aborted via the SCSI error handler,
> it can be terminated directly by the SCSI midlayer via
> scsi_finish_command(), which bypasses pqi_prep_for_scsi_done().

This driver registers its own .eh_abort_handler (pqi_eh_abort_handler())
and reset handlers, and never calls scsi_finish_command(). Every
completion path -- normal I/O, AIO retry, RAID error info, and the
controller-offline failure sweep -- goes through one choke point,
pqi_scsi_done(), which always calls pqi_prep_for_scsi_done() before
scsi_done():

    static inline void pqi_scsi_done(struct scsi_cmnd *scmd)
    {
            pqi_prep_for_scsi_done(scmd);
            scsi_done(scmd);
    }

pqi_eh_abort_handler() doesn't complete the command itself. It blocks
until pqi_prep_for_scsi_done() runs for that command. So by the time
the abort handler is allowed to return SUCCESS, the marker has already
been handled. There's no window for the bypass this review assumes.

      parent reply	other threads:[~2026-07-27 19:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22 22:03 [PATCH v1 0/4] smartpqi: fixes and updates for 2.1.42-011 David Strahan
2026-07-22 22:03 ` [PATCH v1 1/4] smartpqi: Fix AIO retry marker cleared by SCSI core between dispatches David Strahan
2026-07-22 22:36   ` sashiko-bot
2026-07-22 22:03 ` [PATCH v1 2/4] smartpqi: add support for CCISS_BIG_PASSTHRU ioctl David Strahan
2026-07-22 22:32   ` sashiko-bot
2026-07-22 22:04 ` [PATCH v1 3/4] smartpqi: add new pci device-ids David Strahan
2026-07-22 22:04 ` [PATCH v1 4/4] smartpqi: update version to 2.1.42-011 David Strahan
2026-07-27 19:55 ` David Strahan [this message]

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=20260727195547.19480-1-david.strahan@microchip.com \
    --to=david.strahan@microchip.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sashiko-bot@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox