From: Greg KH <gregkh@linuxfoundation.org>
To: Duoming Zhou <duoming@zju.edu.cn>
Cc: linux-staging@lists.linux.dev, davem@davemloft.net,
kuba@kernel.org, alexander.deucher@amd.com, broonie@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8192u: Fix sleep in atomic context bug in dm_fsync_timer_callback
Date: Mon, 6 Jun 2022 07:43:11 +0200 [thread overview]
Message-ID: <Yp2T7xSM8YX7lX0/@kroah.com> (raw)
In-Reply-To: <20220520061541.14785-1-duoming@zju.edu.cn>
On Fri, May 20, 2022 at 02:15:41PM +0800, Duoming Zhou wrote:
> There are sleep in atomic context bugs when dm_fsync_timer_callback is
> executing. The root cause is that the memory allocation functions with
> GFP_KERNEL parameter are called in dm_fsync_timer_callback which is a
> timer handler. The call paths that could trigger bugs are shown below:
>
> (interrupt context)
> dm_fsync_timer_callback
> write_nic_byte
> kzalloc(sizeof(data), GFP_KERNEL); //may sleep
> write_nic_dword
> kzalloc(sizeof(data), GFP_KERNEL); //may sleep
>
> This patch changes allocation mode from GFP_KERNEL to GFP_ATOMIC
> in order to prevent atomic context sleeping. The GFP_ATOMIC flag
> makes memory allocation operation could be used in atomic context.
>
> Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
What commit id does this fix?
And how did you find this issue? Did you run the code to verify it
still works properly?
thanks,
greg k-h
next prev parent reply other threads:[~2022-06-06 5:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-20 6:15 Duoming Zhou
2022-06-06 5:43 ` Greg KH [this message]
2022-06-06 7:11 ` duoming
2022-06-07 11:01 ` Greg KH
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=Yp2T7xSM8YX7lX0/@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=alexander.deucher@amd.com \
--cc=broonie@kernel.org \
--cc=davem@davemloft.net \
--cc=duoming@zju.edu.cn \
--cc=kuba@kernel.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
all inboxes | Powered by JetHome®