Re: [PATCH] driver core: Fix locking bug in deferred_probe_timeout_work_func()

2021-04-15 Thread Greg Kroah-Hartman
On Mon, Apr 12, 2021 at 11:09:06AM -0700, Saravana Kannan wrote: > commit eed6e41813deb9ee622cd9242341f21430d7789f upstream. > > list_for_each_entry_safe() is only useful if we are deleting nodes in a > linked list within the loop. It doesn't protect against other threads > adding/deleting nodes t

[PATCH] driver core: Fix locking bug in deferred_probe_timeout_work_func()

2021-04-12 Thread Saravana Kannan
commit eed6e41813deb9ee622cd9242341f21430d7789f upstream. list_for_each_entry_safe() is only useful if we are deleting nodes in a linked list within the loop. It doesn't protect against other threads adding/deleting nodes to the list in parallel. We need to grab deferred_probe_mutex when traversin