public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Felix Gu <ustc.gu@gmail.com>
Cc: "Ariana Lazar" <ariana.lazar@microchip.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] iio: dac: mcp47feb02: Fix mutex used before initialization
Date: Wed, 25 Feb 2026 17:59:25 +0200	[thread overview]
Message-ID: <aZ8cXbvj7KcQNvp3@smile.fi.intel.com> (raw)
In-Reply-To: <20260225-mcp47feb02-v2-1-4792dc3942d9@gmail.com>

On Wed, Feb 25, 2026 at 10:48:57PM +0800, Felix Gu wrote:
> The mcp47feb02_parse_fw() function uses data->lock, but the mutex was
> initialized after this function in probe path.
> 
> Since mcp47feb02_parse_fw() is only called from probe(), remove the lock.

But is it called early enough before anything that may trigger access to
'data'? Exempli gratia, IRQ handler in some cases may be triggered before
probe finished (is it the case here?).

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-02-25 15:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-25 14:48 [PATCH v2] iio: dac: mcp47feb02: Fix mutex used before initialization Felix Gu
2026-02-25 15:59 ` Andy Shevchenko [this message]
     [not found]   ` <CAN4SLj3jw-SqXSV04CA_-d=e=Mu63xaJuzu1rUYzTtt7myqMKw@mail.gmail.com>
2026-02-26 13:18     ` Andy Shevchenko
2026-02-28 16:33       ` Jonathan Cameron

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=aZ8cXbvj7KcQNvp3@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andy@kernel.org \
    --cc=ariana.lazar@microchip.com \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=ustc.gu@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox