All of lore.kernel.org
 help / color / mirror / Atom feed
* [cel:simple-offset-maple 5/7] lib/test_maple_tree.c:3612 alloc_cyclic_testing() warn: sleeping in atomic context
@ 2024-02-15 20:37 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-02-15 20:37 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: "Liam R. Howlett" <Liam.Howlett@oracle.com>
CC: Chuck Lever <chuck.lever@oracle.com>

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux simple-offset-maple
head:   380438ec8aea040862920a4abd295062125939fe
commit: c9d26c93c59232dcd560b8275e9c2a7f058c9a39 [5/7] test_maple_tree: testing the cyclic allocation
:::::: branch date: 4 hours ago
:::::: commit date: 2 days ago
config: i386-randconfig-141-20240214 (https://download.01.org/0day-ci/archive/20240216/202402160419.2pdB2GFG-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)

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 <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202402160419.2pdB2GFG-lkp@intel.com/

smatch warnings:
lib/test_maple_tree.c:3612 alloc_cyclic_testing() warn: sleeping in atomic context

vim +3612 lib/test_maple_tree.c

eb2e817f38cafb Liam R. Howlett 2023-05-18  3601  
c9d26c93c59232 Liam R. Howlett 2024-02-13  3602  static noinline void __init alloc_cyclic_testing(struct maple_tree *mt)
c9d26c93c59232 Liam R. Howlett 2024-02-13  3603  {
c9d26c93c59232 Liam R. Howlett 2024-02-13  3604  	unsigned long location;
c9d26c93c59232 Liam R. Howlett 2024-02-13  3605  	unsigned long next;
c9d26c93c59232 Liam R. Howlett 2024-02-13  3606  	int ret = 0;
c9d26c93c59232 Liam R. Howlett 2024-02-13  3607  	MA_STATE(mas, mt, 0, 0);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3608  
c9d26c93c59232 Liam R. Howlett 2024-02-13  3609  	next = 0;
c9d26c93c59232 Liam R. Howlett 2024-02-13  3610  	mtree_lock(mt);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3611  	for (int i = 0; i < 100; i++) {
c9d26c93c59232 Liam R. Howlett 2024-02-13 @3612  		mas_alloc_cyclic(&mas, &location, mt, 2, ULONG_MAX, &next, GFP_KERNEL);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3613  		MAS_BUG_ON(&mas, i != location - 2);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3614  		MAS_BUG_ON(&mas, mas.index != location);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3615  		MAS_BUG_ON(&mas, mas.last != location);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3616  		MAS_BUG_ON(&mas, i != next - 3);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3617  	}
c9d26c93c59232 Liam R. Howlett 2024-02-13  3618  
c9d26c93c59232 Liam R. Howlett 2024-02-13  3619  	mtree_unlock(mt);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3620  	mtree_destroy(mt);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3621  	next = 0;
c9d26c93c59232 Liam R. Howlett 2024-02-13  3622  	mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3623  	for (int i = 0; i < 100; i++) {
c9d26c93c59232 Liam R. Howlett 2024-02-13  3624  		mtree_alloc_cyclic(mt, &location, mt, 2, ULONG_MAX, &next, GFP_KERNEL);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3625  		MT_BUG_ON(mt, i != location - 2);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3626  		MT_BUG_ON(mt, i != next - 3);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3627  		MT_BUG_ON(mt, mtree_load(mt, location) != mt);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3628  	}
c9d26c93c59232 Liam R. Howlett 2024-02-13  3629  
c9d26c93c59232 Liam R. Howlett 2024-02-13  3630  	mtree_destroy(mt);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3631  	/* Overflow test */
c9d26c93c59232 Liam R. Howlett 2024-02-13  3632  	next = ULONG_MAX - 1;
c9d26c93c59232 Liam R. Howlett 2024-02-13  3633  	ret = mtree_alloc_cyclic(mt, &location, mt, 2, ULONG_MAX, &next, GFP_KERNEL);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3634  	MT_BUG_ON(mt, ret != 0);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3635  	ret = mtree_alloc_cyclic(mt, &location, mt, 2, ULONG_MAX, &next, GFP_KERNEL);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3636  	MT_BUG_ON(mt, ret != 0);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3637  	ret = mtree_alloc_cyclic(mt, &location, mt, 2, ULONG_MAX, &next, GFP_KERNEL);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3638  	MT_BUG_ON(mt, ret != 1);
c9d26c93c59232 Liam R. Howlett 2024-02-13  3639  }
c9d26c93c59232 Liam R. Howlett 2024-02-13  3640  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-15 20:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-15 20:37 [cel:simple-offset-maple 5/7] lib/test_maple_tree.c:3612 alloc_cyclic_testing() warn: sleeping in atomic context kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.