All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Dirk Behme <dirk.behme@de.bosch.com>
Cc: Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH] [RFC] mmc: tmio: Protect the asynchronous usage of mrq by a lock
Date: Wed, 28 Feb 2024 10:54:03 +0100	[thread overview]
Message-ID: <Zd8Cu_y8nojPklXr@shikoro> (raw)
In-Reply-To: <20240220061356.3001761-1-dirk.behme@de.bosch.com>

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

Hi Dirk,

thanks a ton for this report and RFC!

On Tue, Feb 20, 2024 at 07:13:56AM +0100, Dirk Behme wrote:
> Analyzing the KASAN report [1] tells us that in
> 
> mmc_request_done+0xcc/0x30c
> 
> what can be resolved to an access to
> 
> mrq->cap_cmd_during_tfr
> 
> in mmc_command_done() called inline from mmc_request_done() "mrq"
> becomes invalid.
> 
> In the driver we have two work queues, tmio_mmc_reset_work() and
> tmio_mmc_done_work(). Both operate on mrq.
> 
> Synchronize this by extending the spin lock protected sections.

As discussed further privately, we both see the problem but want to keep
the critical sections minimal. So, after some more investigations, a
counter-patch is coming in a minute.

   Wolfram


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      parent reply	other threads:[~2024-02-28  9:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20  6:13 [PATCH] [RFC] mmc: tmio: Protect the asynchronous usage of mrq by a lock Dirk Behme
2024-02-20  9:34 ` Wolfram Sang
2024-02-28  9:54 ` Wolfram Sang [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=Zd8Cu_y8nojPklXr@shikoro \
    --to=wsa+renesas@sang-engineering.com \
    --cc=dirk.behme@de.bosch.com \
    --cc=linux-renesas-soc@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.