]> git.baikalelectronics.ru Git - kernel.git/commit
pstore: Convert "psinfo" locking to mutex
authorKees Cook <keescook@chromium.org>
Tue, 5 May 2020 02:31:36 +0000 (19:31 -0700)
committerKees Cook <keescook@chromium.org>
Tue, 12 May 2020 16:13:47 +0000 (09:13 -0700)
commit5a4cbbb5fcd8ceb0c1ec35376b7b9e376ce7ad05
treefbeece16030bf753ffc420a5e496ca0ce0ea2c6a
parent3d89f05dc6f1699b8cf8b56872e87bd39910ee9f
pstore: Convert "psinfo" locking to mutex

Currently pstore can only have a single backend attached at a time, and it
tracks the active backend via "psinfo", under a lock. The locking for this
does not need to be a spinlock, and in order to avoid may_sleep() issues
during future changes to pstore_unregister(), switch to a mutex instead.

Link: https://lore.kernel.org/lkml/20200506152114.50375-4-keescook@chromium.org/
Signed-off-by: Kees Cook <keescook@chromium.org>
fs/pstore/platform.c