On Fri, 24 Jun 2022 at 11:05, Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> wrote: > > On 2022-06-18 11:34:51 [+0200], Mike Galbraith wrote: > > I moved the prandom_u32_max() call in kfence_guarded_alloc() out from > > under raw spinlock to shut this one up. > > Care to send a patch? I don't even why kfence_metadata::lock is a > raw_spinlock_t. This is the case since the beginning of the code. Because kfence_handle_page_fault() may be called from anywhere, incl. other raw_spinlock critical sections. We have this problem with all debugging tools where the bug may manifest anywhere. A patch for it already exists in -mm: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?h=mm-hotfixes-stable&id=327b18b7aaed5de3b548212e3ab75133bf323759