[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a74c86e2d6a7272d206ba44e40d69f48a25be4c1.camel@sipsolutions.net>
Date: Fri, 10 Jun 2022 15:25:42 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Duoming Zhou <duoming@....edu.cn>, linux-kernel@...r.kernel.org,
linux-wireless@...r.kernel.org, briannorris@...omium.org
Cc: amitkarwar@...il.com, ganapathi017@...il.com,
sharvari.harisangam@....com, huxinming820@...il.com,
kvalo@...nel.org, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
gregkh@...uxfoundation.org, rafael@...nel.org
Subject: Re: [PATCH v6 1/2] devcoredump: remove the useless gfp_t parameter
in dev_coredumpv and dev_coredumpm
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@....edu.cn>
> Reviewed-by: Brian Norris <briannorris@...omium.org>
Sorry I've been buried in WiFi 7 (and kind of still am...)
Reviewed-by: Johannes Berg <johannes@...solutions.net>
johannes
Powered by blists - more mailing lists