Commit e9a330c4 authored by Kees Cook's avatar Kees Cook

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: 10970449 ("pstore: Make spinlock per zone instead of global")
Fixes: 76d5692a ("pstore: Correctly initialize spinlock and flags")
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org
parent 3faf9354
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment