mirror of
https://github.com/brain-hackers/linux-brain.git
synced 2024-06-09 15:26:21 +09:00
pstore: Use dynamic spinlock initializer
commite9a330c428
upstream. 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:109704492e
("pstore: Make spinlock per zone instead of global") Fixes:76d5692a58
("pstore: Correctly initialize spinlock and flags") Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a0840275e3
commit
e10f7bd6a6
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user