summaryrefslogtreecommitdiff
path: root/fs/pstore
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-03-06 09:08:58 +0300
committerKees Cook <keescook@chromium.org>2017-03-07 19:21:38 +0300
commite9a330c4289f2ba1ca4bf98c2b430ab165a8931b (patch)
treee338f03b049d95d474485cb4be8a785a4a1b00eb /fs/pstore
parent3faf93543ccb3410bfaf992a0de4a925631a3526 (diff)
downloadlinux-e9a330c4289f2ba1ca4bf98c2b430ab165a8931b.tar.xz
pstore: Use dynamic spinlock initializer
The per-prz spinlock should be using the dynamic initializer so that lockdep can correctly track it. Without this, under lockdep, we get a warning at boot that the lock is in non-static memory. Fixes: 109704492ef6 ("pstore: Make spinlock per zone instead of global") Fixes: 76d5692a5803 ("pstore: Correctly initialize spinlock and flags") Signed-off-by: Kees Cook <keescook@chromium.org> Cc: stable@vger.kernel.org
Diffstat (limited to 'fs/pstore')
-rw-r--r--fs/pstore/ram_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c
index bc927e30bdcc..e11672aa4575 100644
--- a/fs/pstore/ram_core.c
+++ b/fs/pstore/ram_core.c
@@ -532,7 +532,7 @@ struct persistent_ram_zone *persistent_ram_new(phys_addr_t start, size_t size,
}
/* Initialize general buffer state. */
- prz->buffer_lock = __RAW_SPIN_LOCK_UNLOCKED(buffer_lock);
+ raw_spin_lock_init(&prz->buffer_lock);
prz->flags = flags;
ret = persistent_ram_buffer_map(start, size, prz, memtype);