Re: [PATCH 2/2] drivers core: multi-threading device shutdown
From: Pavel Tatashin
Date: Thu May 03 2018 - 09:39:24 EST
On Thu, May 3, 2018 at 1:54 AM Tobin C. Harding <tobin@xxxxxxxxxxxx> wrote:
> This code was a pleasure to read, super clean.
Hi Tobin,
Thank you very much for your review, I will address all of your comments in
the next revision.
BTW, I found a lock ordering issue in my work that that I will need to
fix:
In device_shutdown() device_lock() must be taken before
devices_kset->list_lock. Instead I will use device_trylock(), and if that
fails, will drop devices_kset->list_lock and acquiring the device lock
outside, and check that the device is still in the list after taking the
list lock again.
Pavel