From: Andi Shyti <andi.shyti@kernel.org>
To: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
Cc: intel-xe@lists.freedesktop.org, rodrigo.vivi@intel.com,
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
Danilo Krummrich <dakr@kernel.org>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>
Subject: Re: [PATCH] drm/xe/i2c: Fix use-after-free on driver unload
Date: Tue, 27 Oct 2026 16:11:51 +0100 [thread overview]
Message-ID: <auC-ryi8PFiPgiLE@zenone.zhora.eu> (raw)
In-Reply-To: <20261009164241.923756-2-balasubramani.vivekanandan@intel.com>
Hi Balasubramani,
On Fri, Oct 09, 2026 at 10:12:42PM +0530, Balasubramani Vivekanandan wrote:
> The kernel crashes when unloading the xe driver on CRI:
>
> Oops: general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b6b73
> RIP: 0010:platform_device_release+0x80/0x90
> Call Trace:
> device_release+0x44/0xa0
> kobject_put+0x9b/0x250
> put_device+0x13/0x30
> platform_device_unregister+0x29/0x40
> xe_i2c_remove+0x80/0xa0 [xe]
> devm_action_release+0x16/0x30
> release_nodes+0x3d/0x140
> devres_release_all+0x96/0xd0
>
> This started after commit 0f485f88656af ("drm/xe/i2c: use
> device_create_managed_software_node()"), which attaches a managed
> software node to a platform device created with platform_device_alloc().
...
> We can fix it by removing the dependency on i2c->dev in
> xe_i2c_notifier(). It is using it to match against the right adapter.
> Instead of using the device, use its parent to match.
>
> Fixes: 0f485f88656af ("drm/xe/i2c: use device_create_managed_software_node()")
> Cc: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
> Cc: Danilo Krummrich <dakr@kernel.org>
> Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
The patch looks fine to me but I still see that there are some
concerns. Like Danilo's points are valid, can those be addressed
later?
For now:
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Let's wait a little and if nothing arises I can apply this for
XE.
Thanks,
Andi
next prev parent reply other threads:[~2026-10-27 15:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 16:42 [PATCH] drm/xe/i2c: Fix use-after-free on driver unload Balasubramani Vivekanandan
2026-10-09 16:42 ` ✗ CI.checkpatch: warning for " Patchwork
2026-10-09 16:44 ` ✓ CI.KUnit: success " Patchwork
2026-10-09 16:47 ` [PATCH] " sashiko-bot
2026-10-12 12:25 ` Vivekanandan, Balasubramani
2026-10-09 18:19 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-10-09 21:19 ` ✓ Xe.CI.FULL: " Patchwork
2026-10-10 20:14 ` [PATCH] " Danilo Krummrich
2026-10-12 12:15 ` Vivekanandan, Balasubramani
2026-10-12 11:46 ` Kumar G, Naresh
2026-10-12 13:16 ` Vivekanandan, Balasubramani
2026-10-26 11:56 ` Heikki Krogerus
2026-10-26 18:10 ` Andy Shevchenko
2026-10-28 17:10 ` Kumar G, Naresh
2026-10-29 17:02 ` Bartosz Golaszewski
2026-10-26 11:47 ` Heikki Krogerus
2026-10-27 12:49 ` Andi Shyti
2026-10-28 17:24 ` Kumar G, Naresh
2026-10-27 15:11 ` Andi Shyti [this message]
2026-10-29 8:09 ` Vivekanandan, Balasubramani
2026-10-29 17:04 ` Bartosz Golaszewski
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=auC-ryi8PFiPgiLE@zenone.zhora.eu \
--to=andi.shyti@kernel.org \
--cc=balasubramani.vivekanandan@intel.com \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=dakr@kernel.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=rodrigo.vivi@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 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.