mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Alexander Usyskin <alexander.usyskin@intel.com>
Cc: Reuven Abliyev <reuven.abliyev@intel.com>, linux-kernel@vger.kernel.org
Subject: Re: [char-misc-next v4 0/3] mei: fix mei_device lifetime
Date: Sat, 19 Jul 2025 09:58:35 +0200	[thread overview]
Message-ID: <2025071911-banker-skewer-ae65@gregkh> (raw)
In-Reply-To: <20250717141112.1696482-1-alexander.usyskin@intel.com>

On Thu, Jul 17, 2025 at 05:11:09PM +0300, Alexander Usyskin wrote:
> mei_device data structure is allocated using devm_* functions
> and hooked to the parent device.
> It works for client systems where parent device is pci one.
> When parent device is auxiliary bus device produced by
> graphics driver, the parent can be destroyed before child
> and on the way it cleans all allocated memory.
> This leads to use-after-free if mei character device is
> opened when parent device is destroyed.
> 
> Connect mei_device structure lifteme to mei class device lifetime
> by adding mei_device free to class device remove callback.
> Decouple character device lifetime from parwnt structure lifetime.
> 
> As dev pointer in mei_device structure is converted to non-pointer
> device all dev_* calls should be touched in this patch series.
> 
> Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14201

I took the first 2 patches now, as they are "simple".  Give me some more
time to get a chance to review the last one, thanks.

greg k-h

      parent reply	other threads:[~2025-07-19  8:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-17 14:11 Alexander Usyskin
2025-07-17 14:11 ` [char-misc-next v4 1/3] mei: bus: use cldev in prints Alexander Usyskin
2025-07-17 14:11 ` [char-misc-next v4 2/3] mei: more prints with client prefix Alexander Usyskin
2025-07-17 14:11 ` [char-misc-next v4 3/3] mei: hook mei_device on class device Alexander Usyskin
2025-07-19  7:58 ` Greg Kroah-Hartman [this message]

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=2025071911-banker-skewer-ae65@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=alexander.usyskin@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reuven.abliyev@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

all inboxes | Powered by JetHome®