public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Rajani Kantha <681739313@139.com>
Cc: bvanassche@acm.org, adrian.hunter@intel.com,
	martin.petersen@oracle.com, stable@vger.kernel.org
Subject: Re: [PATCH 6.1] scsi: ufs: core: Fix handling of lrbp->cmd
Date: Mon, 16 Feb 2026 11:33:21 +0100	[thread overview]
Message-ID: <2026021601-justify-reusable-0fdd@gregkh> (raw)
In-Reply-To: <20260213030257.1688-1-681739313@139.com>

On Fri, Feb 13, 2026 at 11:02:57AM +0800, Rajani Kantha wrote:
> From: Bart Van Assche <bvanassche@acm.org>
> 
> ufshcd_queuecommand() may be called two times in a row for a SCSI command
> before it is completed. Hence make the following changes:
> 
>  - In the functions that submit a command, do not check the old value of
>    lrbp->cmd nor clear lrbp->cmd in error paths.
> 
>  - In ufshcd_release_scsi_cmd(), do not clear lrbp->cmd.
> 
> See also scsi_send_eh_cmnd().
> 
> This commit prevents that the following appears if a command times out:
> 
> WARNING: at drivers/ufs/core/ufshcd.c:2965 ufshcd_queuecommand+0x6f8/0x9a8
> Call trace:
>  ufshcd_queuecommand+0x6f8/0x9a8
>  scsi_send_eh_cmnd+0x2c0/0x960
>  scsi_eh_test_devices+0x100/0x314
>  scsi_eh_ready_devs+0xd90/0x114c
>  scsi_error_handler+0x2b4/0xb70
>  kthread+0x16c/0x1e0
> 
> Fixes: 5a0b0cb9bee7 ("[SCSI] ufs: Add support for sending NOP OUT UPIU")
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> Link: https://lore.kernel.org/r/20230524203659.1394307-3-bvanassche@acm.org
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
> [ Removed the change in ufshcd_advanced_rpmb_req_handler() due to missing
> commit:6ff265fc5ef6("scsi: ufs: core: bsg: Add advanced RPMB support in ufs_bsg") ]
> Signed-off-by: Rajani Kantha <681739313@139.com>
> ---
>  drivers/ufs/core/ufshcd.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)

No hint as to what the upstream git commit id this is?  :(


      reply	other threads:[~2026-02-16 10:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-13  3:02 [PATCH 6.1] scsi: ufs: core: Fix handling of lrbp->cmd Rajani Kantha
2026-02-16 10:33 ` Greg KH [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=2026021601-justify-reusable-0fdd@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=681739313@139.com \
    --cc=adrian.hunter@intel.com \
    --cc=bvanassche@acm.org \
    --cc=martin.petersen@oracle.com \
    --cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox