All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org,
	Stanley Chu <stanley.chu@mediatek.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	Bean Huo <beanhuo@micron.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Santosh Y <santoshsy@gmail.com>,
	Sujit Reddy Thumma <sthumma@codeaurora.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	Avri Altman <avri.altman@wdc.com>,
	Jaegeuk Kim <jaegeuk@kernel.org>
Subject: Re: [PATCH v2] scsi: ufs: Fix a race condition related to device management
Date: Tue, 26 Jul 2022 23:15:10 -0400	[thread overview]
Message-ID: <165889169552.689.16787074693111519230.b4-ty@oracle.com> (raw)
In-Reply-To: <20220720170228.1598842-1-bvanassche@acm.org>

On Wed, 20 Jul 2022 10:02:23 -0700, Bart Van Assche wrote:

> If a device management command completion happens after
> wait_for_completion_timeout() times out and before ufshcd_clear_cmds() is
> called then the completion code may crash on the complete() call in
> __ufshcd_transfer_req_compl(). This patch fixes the following crash:
> 
> Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008
> Call trace:
>  complete+0x64/0x178
>  __ufshcd_transfer_req_compl+0x30c/0x9c0
>  ufshcd_poll+0xf0/0x208
>  ufshcd_sl_intr+0xb8/0xf0
>  ufshcd_intr+0x168/0x2f4
>  __handle_irq_event_percpu+0xa0/0x30c
>  handle_irq_event+0x84/0x178
>  handle_fasteoi_irq+0x150/0x2e8
>  __handle_domain_irq+0x114/0x1e4
>  gic_handle_irq.31846+0x58/0x300
>  el1_irq+0xe4/0x1c0
>  efi_header_end+0x110/0x680
>  __irq_exit_rcu+0x108/0x124
>  __handle_domain_irq+0x118/0x1e4
>  gic_handle_irq.31846+0x58/0x300
>  el1_irq+0xe4/0x1c0
>  cpuidle_enter_state+0x3ac/0x8c4
>  do_idle+0x2fc/0x55c
>  cpu_startup_entry+0x84/0x90
>  kernel_init+0x0/0x310
>  start_kernel+0x0/0x608
>  start_kernel+0x4ec/0x608
> 
> [...]

Applied to 5.19/scsi-fixes, thanks!

[1/1] scsi: ufs: Fix a race condition related to device management
      https://git.kernel.org/mkp/scsi/c/f5c2976e0cb0

-- 
Martin K. Petersen	Oracle Linux Engineering

      reply	other threads:[~2022-07-27  3:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-20 17:02 [PATCH v2] scsi: ufs: Fix a race condition related to device management Bart Van Assche
2022-07-27  3:15 ` Martin K. Petersen [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=165889169552.689.16787074693111519230.b4-ty@oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=adrian.hunter@intel.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=jaegeuk@kernel.org \
    --cc=jejb@linux.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=santoshsy@gmail.com \
    --cc=stanley.chu@mediatek.com \
    --cc=sthumma@codeaurora.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.