All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kumar G, Naresh" <naresh.kumar.g@intel.com>
To: Andi Shyti <andi.shyti@kernel.org>
Cc: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>,
	<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>,
	"Upadhyay, Tejas" <tejas.upadhyay@intel.com>
Subject: Re: [PATCH] drm/xe/i2c: Fix use-after-free on driver unload
Date: Wed, 28 Oct 2026 22:54:36 +0530	[thread overview]
Message-ID: <5ba99703-abb5-4a6c-9de8-54c585cb32cb@intel.com> (raw)
In-Reply-To: <auCda9k66Yi_Mh0z@zenone.zhora.eu>


On 10/27/2026 6:19 PM, Andi Shyti wrote:
> Hi Naresh,
>
>> @@ -1198,6 +1199,16 @@ void software_node_notify_remove(struct device *dev)
>>          sysfs_remove_link(&swnode->kobj, dev_name(dev));
>>          sysfs_remove_link(&dev->kobj, "software_node");
>>
>> +       /*
>> +        * A managed node can end up mirrored onto more than one device (e.g.
>> +        * a bus core copying the fwnode onto a child device, as i2c-core does
>> +        * for an adapter's own struct device). Only the device that actually
>> +        * owns the fwnode releases the creation reference and detaches it;
>> +        * every other device only releases the reference software_node_notify()
>> +        * took for it.
>> +        */
>> +       owns_managed_fwnode = swnode->managed && swnode->fwnode.dev == dev;
> at this point fwnode.dev is NULL, set from device_del()
>
> Andi
>
yes correct, device_del() clears fwnode.dev for the primary fwnode 
before calling software_node_notify_remove()


  reply	other threads:[~2026-10-28 17:25 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 [this message]
2026-10-27 15:11 ` Andi Shyti
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=5ba99703-abb5-4a6c-9de8-54c585cb32cb@intel.com \
    --to=naresh.kumar.g@intel.com \
    --cc=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 \
    --cc=tejas.upadhyay@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.