From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>, linux-staging@lists.linux.dev
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: r8188eu: Provide a TODO file for this driver
Date: Sun, 10 Oct 2021 11:21:49 +0200 [thread overview]
Message-ID: <2664974.42EkL7omyK@localhost.localdomain> (raw)
In-Reply-To: <6435467.SEsBC3EFVD@localhost.localdomain>
On Saturday, October 9, 2021 6:31:12 PM CEST Fabio M. De Francesco wrote:
> 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
> >
> > [...]
> >
> 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?
After some research, I've found that Softirqs and Tasklets are also executed
in "atomic context", as hardware interrupt service routines are.
Furthermore, I've also found a .config option named DEBUG_ATOMIC_SLEEP
that should warn if some code is sleeping in "atomic context". However, the
documentation of that option does not explain where the output of these
checks can be read.
I would appreciate any help on this matter.
Thanks,
Fabio
>
> Thank you in advance,
>
> Fabio
>
>
>
>
next prev parent reply other threads:[~2021-10-10 9:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-26 13:03 [PATCH v2] staging: r8188eu: Provide a TODO file for this driver Fabio M. De Francesco
2021-08-26 13:54 ` Dan Carpenter
2021-08-26 16:04 ` Fabio M. De Francesco
2021-10-09 16:31 ` Fabio M. De Francesco
2021-10-10 9:21 ` Fabio M. De Francesco [this message]
2021-10-11 8:21 ` Dan Carpenter
2021-10-11 8:28 ` Dan Carpenter
2021-10-11 9:53 ` Fabio M. De Francesco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2664974.42EkL7omyK@localhost.localdomain \
--to=fmdefrancesco@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox