]> www.infradead.org Git - users/willy/xarray.git/commit
pstore: replace spinlock_t by raw_spinlock_t
authorWen Yang <wen.yang@linux.dev>
Mon, 19 Aug 2024 14:59:45 +0000 (22:59 +0800)
committerKees Cook <kees@kernel.org>
Mon, 26 Aug 2024 20:33:50 +0000 (13:33 -0700)
commit1bf8012fc6997f2117f6919369cde16659db60e0
tree67a16c006c01ccfd84766cf5ae3bb580ee2ea05b
parenta7050ca724807a60e639da953a092cf8dc6d1bf7
pstore: replace spinlock_t by raw_spinlock_t

pstore_dump() is called when both preemption and local IRQ are disabled,
and a spinlock is obtained, which is problematic for the RT kernel because
in this configuration, spinlocks are sleep locks.

Replace the spinlock_t with raw_spinlock_t to avoid sleeping in atomic context.

Signed-off-by: Wen Yang <wen.yang@linux.dev>
Cc: Kees Cook <kees@kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Guilherme G. Piccoli <gpiccoli@igalia.com>
Cc: linux-hardening@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Link: https://lore.kernel.org/r/20240819145945.61274-1-wen.yang@linux.dev
Signed-off-by: Kees Cook <kees@kernel.org>
fs/pstore/platform.c
include/linux/pstore.h