Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77ba7f02 authored by Kees Cook's avatar Kees Cook Committed by Greg Kroah-Hartman
Browse files

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: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 78bfdaab
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -528,7 +528,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);