• Johan Hovold's avatar
    leds: 88pm860x: fix use-after-free on unbind · eca21c2d
    Johan Hovold authored
    Several MFD child drivers register their class devices directly under
    the parent device. 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.
    
    Fixes: 375446df ("leds: 88pm860x: Use devm_led_classdev_register")
    Cc: stable <stable@vger.kernel.org>     # 4.6
    Cc: Amitoj Kaur Chawla <amitoj1606@gmail.com>
    Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
    Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
    eca21c2d
leds-88pm860x.c 5.65 KB