Thread (71 messages) 71 messages, 8 authors, 2026-03-10

Re: [PATCH 01/25] xor: assert that xor_blocks is not called from interrupt context

From: Christoph Hellwig <hch@lst.de>
Date: 2026-03-04 15:42:54
Also in: linux-alpha, linux-arch, linux-btrfs, linux-crypto, linux-raid, linux-riscv, linux-s390, linux-um, lkml, loongarch, sparclinux

On Wed, Mar 04, 2026 at 04:15:48PM +0100, Peter Zijlstra wrote:
On Wed, Mar 04, 2026 at 03:51:34PM +0100, Christoph Hellwig wrote:
quoted
quoted
How about "WARN_ON_ONCE(!preemptible())"?  I think that covers the union
of the context restrictions correctly.  (Compared to in_task(), it
handles the cases where hardirqs or softirqs are disabled.)
Good enough I guess.  Peter?
Sure. The only caveat with that is that for PREEMPT_COUNT=n this might
not work, it unconditionally returns 0.
That's a pretty good argument for the lockdep version...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help