summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-max77693.c
diff options
context:
space:
mode:
authorJann Horn <jann@thejh.net>2016-10-30 23:19:24 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-10 15:24:02 +0100
commitb13d14339baaaa720e7e5448855f33ba501917aa (patch)
treead7a952596416c13e5a56c377d852497cc1248c4 /drivers/leds/leds-max77693.c
parentf6b2db084b65b9dc0f910bc48d5f77c0e5166dc6 (diff)
downloadlinux-stable-b13d14339baaaa720e7e5448855f33ba501917aa.tar.gz
linux-stable-b13d14339baaaa720e7e5448855f33ba501917aa.tar.bz2
linux-stable-b13d14339baaaa720e7e5448855f33ba501917aa.zip
ppdev: fix double-free of pp->pdev->name
free_pardevice() is called by parport_unregister_device() and already frees pp->pdev->name, don't try to do it again. This bug causes kernel crashes. I found and verified this with KASAN and some added pr_emerg()s: [ 60.316568] pp_release: pp->pdev->name == ffff88039cb264c0 [ 60.316692] free_pardevice: freeing par_dev->name at ffff88039cb264c0 [ 60.316706] pp_release: kfree(ffff88039cb264c0) [ 60.316714] ========================================================== [ 60.316722] BUG: Double free or freeing an invalid pointer [ 60.316731] Unexpected shadow byte: 0xFB [ 60.316801] Object at ffff88039cb264c0, in cache kmalloc-32 size: 32 [ 60.316813] Allocated: [ 60.316824] PID = 1695 [ 60.316869] Freed: [ 60.316880] PID = 1695 [ 60.316935] ========================================================== Signed-off-by: Jann Horn <jann@thejh.net> Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/leds/leds-max77693.c')
0 files changed, 0 insertions, 0 deletions