[jimc:dd-ratelimit-2 73/76] lib/dynamic_debug.c:136 ddebug_arena_free() warn: sleeping in atomic context
Dan Carpenter <[email protected]>
| Newsgroups | dev.linux.lists.oe-kbuild |
|---|---|
| Message-ID | <20260819133204.0IWlPMRO1DTJ7vBomXmW0gOgTPtnZ3K4cLKyKzsQ08Q@z> |
tree: https://github.com/jimc/linux.git dd-ratelimit-2 head: 31212444bcca4d1547711ec572b5a398d74640ca commit: 29d01faf08d63c34e46af173536be5af2aaab4fb [73/76] lib/dynamic_debug: Refactor ddebug_arena to vmalloc backing config: i386-randconfig-141 (https://download.01.org/0day-ci/archive/20260819/[email protected]/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 smatch: v0.5.0-9187-g5189e3fb If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <[email protected]> | Reported-by: Dan Carpenter <[email protected]> | Closes: https://lore.kernel.org/r/[email protected]/ smatch warnings: lib/dynamic_debug.c:136 ddebug_arena_free() warn: sleeping in atomic context vim +136 lib/dynamic_debug.c b80df25b9600208 Jim Cromie 2026-07-15 125 static void ddebug_arena_free(struct ddebug_arena *arena) b80df25b9600208 Jim Cromie 2026-07-15 126 { 29d01faf08d63c3 Jim Cromie 2026-08-11 127 struct ddebug_arena_chunk *chunk, *tmp; b80df25b9600208 Jim Cromie 2026-07-15 128 unsigned long flags; b80df25b9600208 Jim Cromie 2026-07-15 129 static DEFINE_SPINLOCK(arena_lock); b80df25b9600208 Jim Cromie 2026-07-15 130 b80df25b9600208 Jim Cromie 2026-07-15 131 spin_lock_irqsave(&arena_lock, flags); b80df25b9600208 Jim Cromie 2026-07-15 132 arena->free_ptr = NULL; b80df25b9600208 Jim Cromie 2026-07-15 133 arena->remaining = 0; 29d01faf08d63c3 Jim Cromie 2026-08-11 134 list_for_each_entry_safe(chunk, tmp, &arena->chunks, link) { 29d01faf08d63c3 Jim Cromie 2026-08-11 135 list_del(&chunk->link); 29d01faf08d63c3 Jim Cromie 2026-08-11 @136 vfree(chunk); vfree() is a sleeping function so you can't call it while holding a spinlock. If you call it from interrupt context, though it doesn't sleep. A bit weird like that. b80df25b9600208 Jim Cromie 2026-07-15 137 } b80df25b9600208 Jim Cromie 2026-07-15 138 spin_unlock_irqrestore(&arena_lock, flags); b80df25b9600208 Jim Cromie 2026-07-15 139 } -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki