Re: [PATCH] pstore: replace spinlock_t by raw_spinlock_t

From: Greg KH
Date: Mon Aug 19 2024 - 13:45:29 EST


On Mon, Aug 19, 2024 at 10:59:45PM +0800, Wen Yang wrote:
> 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.

This feels odd, is it only an out-of-tree RT thing? Or does this affect
in-kernel code as well? What prevents any normal spinlock from sleeping
in your system configuration as well?

thanks,

greg k-h