[PATCH] driver: core: Fix list corruption after device_del()

2020-12-08 Thread Takashi Iwai
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 t

Re: [PATCH] driver: core: Fix list corruption after device_del()

2020-12-08 Thread Rafael J. Wysocki
On Tue, Dec 8, 2020 at 8:03 PM Takashi Iwai wrote: > > 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()

Re: [PATCH] driver: core: Fix list corruption after device_del()

2020-12-08 Thread Greg Kroah-Hartman
On Tue, Dec 08, 2020 at 08:03:26PM +0100, Takashi Iwai wrote: > 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 devic

Re: [PATCH] driver: core: Fix list corruption after device_del()

2020-12-08 Thread Takashi Iwai
On Tue, 08 Dec 2020 20:52:34 +0100, Greg Kroah-Hartman wrote: > > On Tue, Dec 08, 2020 at 08:03:26PM +0100, Takashi Iwai wrote: > > 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