Skip to content

Commit fa77731

Browse files
keesgregkh
authored andcommitted
pstore: Use dynamic spinlock initializer
commit e9a330c4289f2ba1ca4bf98c2b430ab165a8931b 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: 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9ece74e commit fa77731

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/pstore/ram_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ struct persistent_ram_zone *persistent_ram_new(phys_addr_t start, size_t size,
489489
}
490490

491491
/* Initialize general buffer state. */
492-
prz->buffer_lock = __RAW_SPIN_LOCK_UNLOCKED(buffer_lock);
492+
raw_spin_lock_init(&prz->buffer_lock);
493493
prz->flags = flags;
494494

495495
ret = persistent_ram_buffer_map(start, size, prz, memtype);

0 commit comments

Comments
 (0)