Skip to content
  • Mel Gorman's avatar
    mm, page_alloc: do not wake kswapd with zone lock held · 73444bc4
    Mel Gorman authored
    syzbot reported the following regression in the latest merge window and
    it was confirmed by Qian Cai that a similar bug was visible from a
    different context.
    
      ======================================================
      WARNING: possible circular locking dependency detected
      4.20.0+ #297 Not tainted
      ------------------------------------------------------
      syz-executor0/8529 is trying to acquire lock:
      000000005e7fb829 (&pgdat->kswapd_wait){....}, at:
      __wake_up_common_lock+0x19e/0x330 kernel/sched/wait.c:120
    
      but task is already holding lock:
      000000009bb7bae0 (&(&zone->lock)->rlock){-.-.}, at: spin_lock
      include/linux/spinlock.h:329 [inline]
      000000009bb7bae0 (&(&zone->lock)->rlock){-.-.}, at: rmqueue_bulk
      mm/page_alloc.c:2548 [inline]
      000000009bb7bae0 (&(&zone->lock)->rlock){-.-.}, at: __rmqueue_pcplist
      mm/page_alloc.c:3021 [inline]
      000000009bb7bae0 (&(&zone->lock)->rlock){-.-.}, at: rmqueue_pcplist
      mm/page_alloc.c:3050 [inline]
      ...
    73444bc4