All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: David Lechner <dlechner@baylibre.com>
Cc: "Marc Kleine-Budde" <mkl@pengutronix.de>,
	"Mark Brown" <broonie@kernel.org>,
	"Martin Sperl" <kernel@martin.sperl.org>,
	"David Jander" <david@protonic.nl>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Michael Hennerich" <michael.hennerich@analog.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Alain Volmat" <alain.volmat@foss.st.com>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
	linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org, linux-iio@vger.kernel.org,
	"Julien Stephan" <jstephan@baylibre.com>,
	"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
	kernel@pengutronix.de, T.Scherer@eckelmann.de
Subject: Re: [PATCH v2 0/5] spi: add support for pre-cooking messages
Date: Fri, 28 Jun 2024 19:47:12 +0200	[thread overview]
Message-ID: <Zn73IB2blUtGptpq@pengutronix.de> (raw)
In-Reply-To: <9e6b5cff-8692-484e-9e1c-b89a1f49d6c7@baylibre.com>

Hi David,

On Fri, Jun 28, 2024 at 10:27:28AM -0500, David Lechner wrote:
> Hi Oleksij and Marc,
> 
> I'm supposed to be on vacation so I didn't look into this deeply yet
> but I can see what is happening here.
> 
> spi_mux_transfer_one_message() is calling spi_async() which is calling
> __spi_optimize_message() on an already optimized message.
> 
> Then it also calls __spi_unoptimize_message() which tries to release
> resources. But this fails because the spi-mux driver has swapped
> out the pointer to the device in the SPI message. This causes the
> wrong ctlr to be passed to spi_res_release(), causing the crash.
> 
> I don't know if a proper fix could be quite so simple, but here is
> something you could try (untested):
 
Thx! I'll test it at Monday.

Regards,
Oleksij
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2024-06-28 17:47 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19 22:33 [PATCH v2 0/5] spi: add support for pre-cooking messages David Lechner
2024-02-19 22:33 ` David Lechner
2024-02-19 22:33 ` [PATCH v2 1/5] spi: add spi_optimize_message() APIs David Lechner
2024-02-19 22:33   ` David Lechner
2024-02-20 10:50   ` Nuno Sá
2024-02-20 10:50     ` Nuno Sá
2024-02-24 16:36   ` Jonathan Cameron
2024-02-24 16:36     ` Jonathan Cameron
2024-02-24 18:15   ` Markus Elfring
2024-02-24 18:15     ` Markus Elfring
2024-02-24 20:09   ` Markus Elfring
2024-02-24 20:09     ` Markus Elfring
2024-02-26 13:48   ` Mark Brown
2024-02-26 13:48     ` Mark Brown
2024-02-19 22:33 ` [PATCH v2 2/5] spi: move splitting transfers to spi_optimize_message() David Lechner
2024-02-19 22:33   ` David Lechner
2024-02-20 10:52   ` Nuno Sá
2024-02-20 10:52     ` Nuno Sá
2024-02-19 22:33 ` [PATCH v2 3/5] spi: stm32: move splitting transfers to optimize_message David Lechner
2024-02-19 22:33   ` David Lechner
2024-02-24 16:45   ` Jonathan Cameron
2024-02-24 16:45     ` Jonathan Cameron
2024-02-19 22:33 ` [PATCH v2 4/5] spi: axi-spi-engine: move message compile " David Lechner
2024-02-19 22:33   ` David Lechner
2024-02-20 10:45   ` Nuno Sá
2024-02-20 10:45     ` Nuno Sá
2024-02-24 16:51   ` Jonathan Cameron
2024-02-24 16:51     ` Jonathan Cameron
2024-02-19 22:33 ` [PATCH v2 5/5] iio: adc: ad7380: use spi_optimize_message() David Lechner
2024-02-19 22:33   ` David Lechner
2024-02-20 10:41   ` Nuno Sá
2024-02-20 10:41     ` Nuno Sá
2024-02-24 16:57   ` Jonathan Cameron
2024-02-24 16:57     ` Jonathan Cameron
2024-02-27 16:36     ` David Lechner
2024-02-27 16:36       ` David Lechner
2024-02-26 19:16 ` (subset) [PATCH v2 0/5] spi: add support for pre-cooking messages Mark Brown
2024-02-26 19:16   ` Mark Brown
2024-06-28  9:49 ` Oleksij Rempel
2024-06-28 10:16   ` Marc Kleine-Budde
2024-06-28 15:27     ` David Lechner
2024-06-28 17:47       ` Oleksij Rempel [this message]
2024-07-01  6:55       ` Oleksij Rempel
2024-06-28 12:17   ` Mark Brown

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=Zn73IB2blUtGptpq@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=T.Scherer@eckelmann.de \
    --cc=alain.volmat@foss.st.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=broonie@kernel.org \
    --cc=david@protonic.nl \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=jstephan@baylibre.com \
    --cc=kernel@martin.sperl.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=michael.hennerich@analog.com \
    --cc=mkl@pengutronix.de \
    --cc=nuno.sa@analog.com \
    /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.