OSDN Git Service

pstore: Convert "records_list" locking to mutex
authorKees Cook <keescook@chromium.org>
Tue, 5 May 2020 02:07:04 +0000 (19:07 -0700)
committerKees Cook <keescook@chromium.org>
Tue, 12 May 2020 16:14:18 +0000 (09:14 -0700)
commitdb23491c77207ef6bec2b232238710de4755db6a
tree4b01e10c8d0d6dffff27593b9f1e4780c7b2b9e1
parent47af61ffb19baa8df2b109582f87f7622fbe85cc
pstore: Convert "records_list" locking to mutex

The pstorefs internal list lock doesn't need to be a spinlock and will
create problems when trying to access the list in the subsequent patch
that will walk the pstorefs records during pstore_unregister(). Change
this to a mutex to avoid may_sleep() warnings when unregistering devices.

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