From: duoming@zju.edu.cn
To: "Jeff Johnson" <quic_jjohnson@quicinc.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
amitkarwar@gmail.com, ganapathi017@gmail.com,
sharvari.harisangam@nxp.com, huxinming820@gmail.com,
kvalo@kernel.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
gregkh@linuxfoundation.org, johannes@sipsolutions.net,
rafael@kernel.org
Subject: Re: [PATCH v4 1/2] devcoredump: remove the useless gfp_t parameter in dev_coredumpv
Date: Fri, 3 Jun 2022 08:42:07 +0800 (GMT+08:00) [thread overview]
Message-ID: <397aa8b.4be56.181270327b5.Coremail.duoming@zju.edu.cn> (raw)
In-Reply-To: <e8d9d010-7fa1-da61-feeb-43f0a101a323@quicinc.com>
Hello,
On Thu, 2 Jun 2022 13:32:48 -0700 Jeff Johnson wrote:
> On 6/2/2022 6:33 AM, Duoming Zhou wrote:
> > The dev_coredumpv() could not be used in atomic context, because
> > it calls kvasprintf_const() and kstrdup() with GFP_KERNEL parameter.
> > The process is shown below:
> >
> > dev_coredumpv(..., gfp_t gfp)
> > dev_coredumpm
> > dev_set_name
> > kobject_set_name_vargs
> > kvasprintf_const(GFP_KERNEL, ...); //may sleep
> > kstrdup(s, GFP_KERNEL); //may sleep
> >
> > This patch removes gfp_t parameter of dev_coredumpv() and changes the
> > gfp_t parameter of dev_coredumpm() to GFP_KERNEL in order to show
> > dev_coredumpv() could not be used in atomic context.
>
> shouldn't you remove the gfp parameter to dev_coredumpm() as well since
> it is actually within that function where dev_set_name() is called which
> cannot be done in atomic context?
Thanks for your suggestion, I will remove the gfp_t parameter of dev_coredumpm() as well.
Best regards,
Duoming Zhou
next prev parent reply other threads:[~2022-06-03 0:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-02 13:33 [PATCH v4 0/2] Remove extra param of dev_coredumpv and fix bugs Duoming Zhou
2022-06-02 13:33 ` [PATCH v4 1/2] devcoredump: remove the useless gfp_t parameter in dev_coredumpv Duoming Zhou
2022-06-02 20:32 ` Jeff Johnson
2022-06-03 0:42 ` duoming [this message]
2022-06-02 13:33 ` [PATCH v4 2/2] mwifiex: fix sleep in atomic context bugs caused by dev_coredumpv Duoming Zhou
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=397aa8b.4be56.181270327b5.Coremail.duoming@zju.edu.cn \
--to=duoming@zju.edu.cn \
--cc=amitkarwar@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ganapathi017@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=huxinming820@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=quic_jjohnson@quicinc.com \
--cc=rafael@kernel.org \
--cc=sharvari.harisangam@nxp.com \
/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;
as well as URLs for NNTP newsgroup(s).