public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Qiu Wenbo <qiuwenbo@gnome.org>
Cc: "Daniel Scally" <djrscally@gmail.com>,
	"Hans de Goede" <hansg@kernel.org>,
	"Qiu Wenbo" <qiuwenbo@kylinsec.com.cn>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Andy Shevchenko" <andy@kernel.org>
Subject: Re: [PATCH] platform/x86: int3472: Fix double free of GPIO device during unregister
Date: Fri, 24 Oct 2025 09:15:27 +0300	[thread overview]
Message-ID: <aPsZf-sL3a44hdDd@smile.fi.intel.com> (raw)
In-Reply-To: <20251024050537.92440-1-qiuwenbo@gnome.org>

On Fri, Oct 24, 2025 at 01:05:37PM +0800, Qiu Wenbo wrote:
> 
> regulator_unregister() already frees the associated GPIO device. On
> ThinkPad X9 (Lunar Lake), this causes a double free issue that leads to
> random failures when other drivers (typically Intel THC) attempt to
> allocate interrupts. The root cause is that the reference count of the
> pinctrl_intel_platform module unexpectedly drops to zero when this
> driver defers its probe.
> 
> This behavior can also be reproduced by unloading the module directly.
> 
> Fix the issue by removing the redundant release of the GPIO device
> during regulator unregistration.
> 
> Fixes: 1e5d088a52c2 ("platform/x86: int3472: Stop using devm_gpiod_get()")

> 

Should not be a blank line here.

> Signed-off-by: Qiu Wenbo <qiuwenbo@kylinsec.com.cn>
> ---

The change sounds reasonable to me. FWIW,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-10-24  6:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-24  5:05 [PATCH] platform/x86: int3472: Fix double free of GPIO device during unregister Qiu Wenbo
2025-10-24  6:15 ` Andy Shevchenko [this message]
2025-10-24  7:25 ` Sakari Ailus
2025-10-28  6:30 ` [PATCH v2] " Qiu Wenbo
2025-10-28  9:34   ` Hans de Goede
2025-10-28 16:37   ` Ilpo Järvinen
2025-10-28  8:55 ` [PATCH] " Dan Scally
2025-10-28 10:02   ` Andy Shevchenko
2025-10-28 10:38     ` Hans de Goede
2025-10-28 10:54       ` Andy Shevchenko
2025-10-28 11:09         ` Dan Scally
2025-10-28 11:38           ` Andy Shevchenko
2025-10-28 14:36             ` Hans de Goede
2025-10-28 14:47               ` Andy Shevchenko

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=aPsZf-sL3a44hdDd@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=djrscally@gmail.com \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=qiuwenbo@gnome.org \
    --cc=qiuwenbo@kylinsec.com.cn \
    --cc=sakari.ailus@linux.intel.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