pstore: Make spinlock per zone instead of global
Currently pstore has a global spinlock for all zones. Since the zones are independent and modify different areas of memory, there's no need to have a global lock, so we should use a per-zone lock as introduced here. Also, when ramoops's ftrace use-case has a FTRACE_PER_CPU flag introduced later, which splits the ftrace memory area into a single zone per CPU, it will eliminate the need for locking. In preparation for this, make the locking optional. Signed-off-by: NJoel Fernandes <joelaf@google.com> [kees: updated commit message] Signed-off-by: NKees Cook <keescook@chromium.org>
Showing
想要评论请 注册 或 登录