On 5/14/24 10:54, Dan Carpenter wrote: > On Mon, May 13, 2024 at 04:16:05PM +0200, Alexis Lothoré wrote: >> Hello Dan, >> sorry for the late reply >> >> On 5/9/24 15:24, Dan Carpenter wrote: >>> Hello Alexis Lothoré, >>> >>> Commit f236464f1db7 ("wifi: wilc1000: convert list management to >>> RCU") from Apr 10, 2024 (linux-next), leads to the following Smatch >>> static checker warning: >>> >>> drivers/net/wireless/microchip/wilc1000/mon.c:236 wilc_wfi_init_mon_interface() >>> warn: sleeping in atomic context >> >> I am struggling to reproduce the warning in smatch. I executed those basic steps: >> - clone and build latest smatch >> - checkout linux-next master branch >> - export ARCH and CROSS_COMPILE >> - load a defconfig enabling all features in wilc driver >> - run ~/src/smatch/smatch_scripts/build_kernel_data.sh >> - then run ~/src/smatch/smatch_scripts/test_kernel.sh >> Yet I do no see any mention to wilc in the resulting smatch_warns.txt file. The >> outcome is the same if I run smatch only on the wilc driver: >> - ~/src/smatch/smatch_scripts/kchecker drivers/net/wireless/microchip/ >> >> Am I missing something obvious ? > > Yeah. I'm sorry, I need to write a blog entry about this. These checks > rely on the cross function database, and you need to rebuild it a bunch > of times. It's a simple process but very time consuming. > > Instead of that, it's better to do run time testing using > CONFIG_DEBUG_ATOMIC_SLEEP=y Yes, that's what I have been doing in the mean time, and it allowed me to at least reproduce the second bug you raised, but I just wanted to make sure to have suppressed those issues once I will have written the proper fixes. I'll continue with the runtime checkers like CONFIG_DEBUG_ATOMIC_SLEEP :) Thanks, Alexis > > regards, > dan carpenter > -- Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com