summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorWen Yang <wen.yang@linux.dev>2024-08-19 17:59:45 +0300
committerKees Cook <kees@kernel.org>2024-08-26 23:33:50 +0300
commit1bf8012fc6997f2117f6919369cde16659db60e0 (patch)
tree67a16c006c01ccfd84766cf5ae3bb580ee2ea05b /include/linux
parenta7050ca724807a60e639da953a092cf8dc6d1bf7 (diff)
downloadlinux-1bf8012fc6997f2117f6919369cde16659db60e0.tar.xz
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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pstore.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/pstore.h b/include/linux/pstore.h
index 638507a3c8ff..fed601053c51 100644
--- a/include/linux/pstore.h
+++ b/include/linux/pstore.h
@@ -182,7 +182,7 @@ struct pstore_info {
struct module *owner;
const char *name;
- spinlock_t buf_lock;
+ raw_spinlock_t buf_lock;
char *buf;
size_t bufsize;