On Thursday, August 26, 2021 3:54:13 PM CEST Dan Carpenter wrote: > Another thing to fix are some of the sleeping in atomic bugs. > > drivers/staging/r8188eu/core/rtw_ap.c:139 update_BCNTIM() warn: sleeping in atomic context > drivers/staging/r8188eu/core/rtw_ap.c:1296 update_bcn_wps_ie() warn: sleeping in atomic context > drivers/staging/r8188eu/core/rtw_ap.c:1361 update_beacon() warn: sleeping in atomic context > drivers/staging/r8188eu/core/rtw_ap.c:1725 ap_free_sta() warn: sleeping in atomic context > drivers/staging/r8188eu/core/rtw_pwrctrl.c:79 ips_leave() warn: sleeping in atomic context > drivers/staging/r8188eu/core/rtw_pwrctrl.c:81 ips_leave() warn: sleeping in atomic context > drivers/staging/r8188eu/core/rtw_mlme_ext.c:6764 receive_disconnect() warn: sleeping in atomic context > drivers/staging/r8188eu/core/rtw_mlme_ext.c:7083 report_del_sta_event() warn: sleeping in atomic context > drivers/staging/r8188eu/core/rtw_mlme_ext.c:8133 set_tx_beacon_cmd() warn: sleeping in atomic context > drivers/staging/r8188eu/os_dep/mlme_linux.c:117 rtw_report_sec_ie() warn: sleeping in atomic context > > There are a few in rtl8723bs as well since the code came from the same > place. > > drivers/staging/rtl8723bs/core/rtw_ap.c:1601 update_beacon() warn: sleeping in atomic context > drivers/staging/rtl8723bs/core/rtw_ap.c:1919 ap_free_sta() warn: sleeping in atomic context > drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:4270 receive_disconnect() warn: sleeping in atomic context > drivers/staging/rtl8723bs/hal/hal_intf.c:100 rtw_hal_init() warn: sleeping in atomic context > > regards, > dan carpenter > Hello Dan, I'd like to address these kind of bugs, but I have a couple of questions about them. 1) You've listed what looks like the output of a compiler or static analyzer. How did you get the warnings you copy-pasted above? 2) I know that both the execution of interrupt handlers (ISRs) as well as any code blocks that are executed holding spinlocks are "atomic contexts". In these cases, "sleeping" is not allowed (for obvious reasons). Besides the two mentioned above, are there any further cases of "atomic contexts" in the kernel? Thank you in advance, Fabio