diff options
| author | Ming Lei <ming.lei@canonical.com> | 2016-07-10 19:27:36 +0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-11 10:58:23 +0200 |
| commit | bd4413a6a3a3a588946f86a9514f5297e050ea63 (patch) | |
| tree | 6369da5ed37f6cb0f8473b5ac360cccf9b8cf10d /include/linux/average.h | |
| parent | 71221ff54ab2e8d537f464f3061013e03fb9b472 (diff) | |
driver core: fix race between creating/querying glue dir and its cleanup
commit cebf8fd16900fdfd58c0028617944f808f97fe50 upstream.
The global mutex of 'gdp_mutex' is used to serialize creating/querying
glue dir and its cleanup. Turns out it isn't a perfect way because
part(kobj_kset_leave()) of the actual cleanup action() is done inside
the release handler of the glue dir kobject. That means gdp_mutex has
to be held before releasing the last reference count of the glue dir
kobject.
This patch moves glue dir's cleanup after kobject_del() in device_del()
for avoiding the race.
Cc: Yijing Wang <wangyijing@huawei.com>
Reported-by: Chandra Sekhar Lingutla <clingutla@codeaurora.org>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'include/linux/average.h')
0 files changed, 0 insertions, 0 deletions
