aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-bit.c
diff options
context:
space:
mode:
authorTakashi Iwai <[email protected]>2020-12-08 20:03:26 +0100
committerGreg Kroah-Hartman <[email protected]>2020-12-09 19:09:27 +0100
commit66482f640755b31cb94371ff6cef17400cda6db5 (patch)
treef6f84f0f7b32bac8c57408a4a302d1b2872d9e66 /lib/mpi/mpi-bit.c
parent0288e7fa35b37fc91c6afec8c420f71d0ade853f (diff)
driver: core: Fix list corruption after device_del()
The device_links_purge() function (called from device_del()) tries to remove the links.needs_suppliers list entry, but it's using list_del(), hence it doesn't initialize after the removal. This is OK for normal cases where device_del() is called via device_destroy(). However, it's not guaranteed that the device object will be really deleted soon after device_del(). In a minor case like HD-audio codec reconfiguration that re-initializes the device after device_del(), it may lead to a crash by the corrupted list entry. As a simple fix, replace list_del() with list_del_init() in order to make the list intact after the device_del() call. Fixes: e2ae9bcc4aaa ("driver core: Add support for linking devices during device addition") Cc: <[email protected]> Reviewed-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Takashi Iwai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: Saravana Kannan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions