syzbot is reporting a lockdep warning in fill_pool() because the allocation from debugobjects is using GFP_ATOMIC, which is (__GFP_HIGH | __GFP_KSWAPD_RECLAIM) and therefore tries to wake up kswapd, which acquires kswapd_wait::lock. Since fill_pool() might be called with arbitrary locks held, fill_pool() should not assume that acquiring kswapd_wait::lock is safe. Use __GFP_HIGH instead and remove __GFP_NORETRY as it is pointless for !__GFP_DIRECT_RECLAIM allocation.
Showing the changes to lib/debugobjects.c (1 of 1 file). Show all
Unified · Split
| @@ -126,7 +126,7 @@ static const char *obj_states[ODEBUG_STATE_MAX] = { · 125 unmodified lines | ||
| 126 | 126 | |
| 127 | 127 | static void fill_pool(void) |
| 128 | 128 | { |
| 129 | − gfp_t gfp = GFP_ATOMIC | __GFP_NORETRY | __GFP_NOWARN; | |
| 129 | + gfp_t gfp = __GFP_HIGH | __GFP_NOWARN; | |
| 130 | 130 | struct debug_obj *obj; |
| 131 | 131 | unsigned long flags; |
| 132 | 132 | |