On 2024-08-03 08:34:05 [+0800], Herbert Xu wrote: > On Fri, Aug 02, 2024 at 09:28:32AM -0700, Eric Biggers wrote: > > > > Note that kfree() lacks a might_sleep(), and its kerneldoc does not say that it > > can sleep. Have you checked for other instances of this same problem? It seems > > it would be quite common kernel-wide. Is it really necessary that kfree() takes > > a sleepable lock on PREEMPT_RT? > > Agreed. kfree() gets called in all sorts of places under softirq > context in the network stack which would presumably have the same > issue. > > Please give a bit of context of when kfree started doing this. I added "under PREEMPT_RT" in the patch description. The softirq under PREEMPT_RT does not disable preemption so it is fully preemptible. The other accelerated versions drop exclusive FPU access/ enable preemption during these operations even on ARM/ ARM64. > Cheers, Sebastian