mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Duoming Zhou <duoming@zju.edu.cn>,
	linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
	briannorris@chromium.org
Cc: 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, rafael@kernel.org
Subject: Re: [PATCH v6 1/2] devcoredump: remove the useless gfp_t parameter in dev_coredumpv and dev_coredumpm
Date: Fri, 10 Jun 2022 15:25:42 +0200	[thread overview]
Message-ID: <a74c86e2d6a7272d206ba44e40d69f48a25be4c1.camel@sipsolutions.net> (raw)
In-Reply-To: <df72af3b1862bac7d8e793d1f3931857d3779dfd.1654569290.git.duoming@zju.edu.cn>

On Tue, 2022-06-07 at 11:26 +0800, Duoming Zhou wrote:
> The dev_coredumpv() and dev_coredumpm() could not be used in atomic
> context, because they call kvasprintf_const() and kstrdup() with
> GFP_KERNEL parameter. The process is shown below:
> 
> dev_coredumpv(.., gfp_t gfp)
>   dev_coredumpm(.., gfp_t gfp)
>     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 dev_coredumpm()
> and changes the gfp_t parameter of kzalloc() in dev_coredumpm() to
> GFP_KERNEL in order to show they could not be used in atomic context.
> 
> Fixes: 833c95456a70 ("device coredump: add new device coredump class")
> Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
> Reviewed-by: Brian Norris <briannorris@chromium.org>

Sorry I've been buried in WiFi 7 (and kind of still am...)

Reviewed-by: Johannes Berg <johannes@sipsolutions.net>

johannes

  reply	other threads:[~2022-06-10 13:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-07  3:26 [PATCH v6 0/2] Remove useless param of devcoredump functions and fix bugs Duoming Zhou
2022-06-07  3:26 ` [PATCH v6 1/2] devcoredump: remove the useless gfp_t parameter in dev_coredumpv and dev_coredumpm Duoming Zhou
2022-06-10 13:25   ` Johannes Berg [this message]
2022-06-07  3:26 ` [PATCH v6 2/2] mwifiex: fix sleep in atomic context bugs caused by dev_coredumpv Duoming Zhou
2022-06-10 13:24 ` [PATCH v6 0/2] Remove useless param of devcoredump functions and fix bugs Greg KH
2022-06-10 13:27   ` Johannes Berg
2022-06-20  3:57   ` duoming

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=a74c86e2d6a7272d206ba44e40d69f48a25be4c1.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=amitkarwar@gmail.com \
    --cc=briannorris@chromium.org \
    --cc=davem@davemloft.net \
    --cc=duoming@zju.edu.cn \
    --cc=edumazet@google.com \
    --cc=ganapathi017@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=huxinming820@gmail.com \
    --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=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

all inboxes | Powered by JetHome®