lkml.org 
[lkml]   [2022]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 1/2] devcoredump: remove the useless gfp_t parameter in dev_coredumpv and dev_coredumpm
Hello,

On Wed, 17 Aug 2022 14:43:29 +0200 Greg KH wrote:

> On Wed, Aug 17, 2022 at 08:39:12PM +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")
> > Reviewed-by: Brian Norris <briannorris@chromium.org>
> > Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
> > Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
> > ---
> > Changes in v7:
> > - Remove gfp_t flag in amdgpu device.
>
> Again, this creates a "flag day" where we have to be sure we hit all
> users of this api at the exact same time. This will prevent any new
> driver that comes into a maintainer tree during the next 3 months from
> ever being able to use this api without cauing build breakages in the
> linux-next tree.
>
> Please evolve this api to work properly for everyone at the same time,
> like was previously asked for so that we can take this change. It will
> take 2 releases, but that's fine.

Thank you for your reply, I will evolve this api to work properly for everyone.
If there are not any new drivers that use this api during the next 3 months,
I will send this patch again. Otherwise, I will wait until there are not new
users anymore.

Best regards,
Duoming Zhou

\
 
 \ /
  Last update: 2022-08-17 16:07    [W:0.051 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site