From: Raag Jadav <raag.jadav@intel.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: intel-xe@lists.freedesktop.org, badal.nilawar@intel.com
Subject: Re: [PATCH v1] drm/xe/i2c: Disable IRQ on unbind
Date: Fri, 11 Sep 2026 14:12:34 +0200 [thread overview]
Message-ID: <aqPwMmbvsY0_-37n@black.igk.intel.com> (raw)
In-Reply-To: <aqPjOgEgFG04B_ef@black.igk.intel.com>
On Fri, Sep 11, 2026 at 01:17:14PM +0200, Heikki Krogerus wrote:
> On Fri, Sep 11, 2026 at 10:10:21AM +0530, Raag Jadav wrote:
> > Currently, struct xe_i2c is freed before SGUnit IRQ is disabled, leaving
> > a potential UAF in case the IRQ is hit in that small window. Explicitly
> > disable I2C IRQ as part of xe_i2c_remove() and fix this.
> >
> > Fixes: 0bb78ce09926 ("drm/xe/i2c: Wire up reset/postinstall for I2C IRQ")
> > Signed-off-by: Raag Jadav <raag.jadav@intel.com>
>
> FWIW:
>
> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Thanks Heikki. I think I missed cleaning up the i2c dangling pointer here,
let me send out a v2.
Raag
> > ---
> > drivers/gpu/drm/xe/xe_i2c.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_i2c.c b/drivers/gpu/drm/xe/xe_i2c.c
> > index d8fa68206f41..82b22c5412ba 100644
> > --- a/drivers/gpu/drm/xe/xe_i2c.c
> > +++ b/drivers/gpu/drm/xe/xe_i2c.c
> > @@ -324,8 +324,10 @@ void xe_i2c_pm_resume(struct xe_device *xe, bool d3cold)
> > static void xe_i2c_remove(void *data)
> > {
> > struct xe_i2c *i2c = data;
> > + struct xe_device *xe = tile_to_xe(i2c->mmio->tile);
> > unsigned int i;
> >
> > + xe_i2c_irq_reset(xe);
> > xe_amc_exit(i2c);
> >
> > for (i = 0; i < XE_I2C_MAX_CLIENTS; i++) {
> > --
> > 2.43.0
>
> --
> heikki
next prev parent reply other threads:[~2026-09-11 12:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 4:40 [PATCH v1] drm/xe/i2c: Disable IRQ on unbind Raag Jadav
2026-09-11 4:54 ` sashiko-bot
2026-09-11 5:02 ` ✓ CI.KUnit: success for " Patchwork
2026-09-11 5:40 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-11 11:17 ` [PATCH v1] " Heikki Krogerus
2026-09-11 12:12 ` Raag Jadav [this message]
2026-09-11 13:30 ` ✓ Xe.CI.FULL: success for " Patchwork
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=aqPwMmbvsY0_-37n@black.igk.intel.com \
--to=raag.jadav@intel.com \
--cc=badal.nilawar@intel.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
/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.