diff options
| author | Kees Cook <keescook@chromium.org> | 2017-03-05 22:08:58 -0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-08-20 13:21:43 +0200 |
| commit | 1d6216a7bf5132302f297f97839fdcf98e49d23c (patch) | |
| tree | 126df64dab51602e66a4b5e9603807964e99f3c4 | |
| parent | 51bf450f3e199221eae6d0ad8f57eb5aabd17be7 (diff) | |
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
Signed-off-by: Joe Maples <joe@frap129.org>
| -rw-r--r-- | fs/pstore/ram_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c index 11628b106..98d973c06 100644 --- a/fs/pstore/ram_core.c +++ b/fs/pstore/ram_core.c @@ -534,7 +534,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); |
