lkml.org 
[lkml]   [2020]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 0/6] leds: fix broken devres usage
On Mon, Jun 1, 2020 at 4:42 PM Johan Hovold <johan@kernel.org> wrote:
>
> Several MFD child drivers register their class devices directly under
> the parent device (about half of the MFD LED drivers do so).
>
> This means you cannot blindly do devres conversions so that
> deregistration ends up being tied to the parent device, something which
> leads to use-after-free on driver unbind when the class device is
> released while still being registered (and, for example, oopses on later
> parent MFD driver unbind or LED class callbacks, or resource leaks and
> name clashes on child driver reload).

Shouldn't MFD take reference count for their children?

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2020-06-01 15:51    [W:1.339 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site