Skip to content

Commit

Permalink
pstore: Use dynamic spinlock initializer
Browse files Browse the repository at this point in the history
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: 1097044 ("pstore: Make spinlock per zone instead of global")
Fixes: 76d5692 ("pstore: Correctly initialize spinlock and flags")
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org
  • Loading branch information
Kees Cook committed Mar 7, 2017
1 parent 3faf935 commit e9a330c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/pstore/ram_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e9a330c

Please sign in to comment.