Package: linux
Version: 6.12.86-1
Severity: important
Tags: upstream
netfs_consume_read_data() calls local_bh_enable() in hard IRQ context
when reached via the cachefiles async read completion path.
The call chain is:
nvme_irq [hard IRQ]
blk_mq_end_request_batch
iomap_dio_bio_end_io
cachefiles_read_complete [cachefiles]
netfs_read_subreq_terminated [netfs]
netfs_consume_read_data [netfs]
__local_bh_enable_ip *** WARNING ***
This fires a WARN_ON at kernel/softirq.c:386 because local_bh_enable()
is called while in hard IRQ context (PID 0, swapper, inside <IRQ>).
The issue is that netfs_consume_read_data() assumes it runs in process
or softirq context, but cachefiles_read_complete() can be called
directly from block layer IRQ completion (iomap_dio_bio_end_io), which
runs in hard IRQ context.
This triggers ~6 seconds after boot once NFS mounts with fsc come up
and the first cached reads complete from the NVMe backing store.
I have only seen this once so far. The system continued running but
cachefilesd appears to have died shortly after (possibly related).
Full trace: