[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <699e56d5.22006.180dce26e02.Coremail.duoming@zju.edu.cn>
Date: Thu, 19 May 2022 23:14:28 +0800 (GMT+08:00)
From: duoming@....edu.cn
To: "Kalle Valo" <kvalo@...nel.org>
Cc: linux-kernel@...r.kernel.org, amitkarwar@...il.com,
ganapathi017@...il.com, sharvari.harisangam@....com,
huxinming820@...il.com, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, linux-wireless@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH net v2] net: wireless: marvell: mwifiex: fix sleep in
atomic context bugs
Hello,
On Thu, 19 May 2022 17:58:47 +0300 Kalle Valo wrote:
> > There are sleep in atomic context bugs when uploading device dump
> > data on usb interface. The root cause is that the operations that
> > may sleep are called in fw_dump_timer_fn which is a timer handler.
> > The call tree shows the execution paths that could lead to bugs:
> >
> > (Interrupt context)
> > fw_dump_timer_fn
> > mwifiex_upload_device_dump
> > dev_coredumpv(..., GFP_KERNEL)
> > dev_coredumpm()
> > kzalloc(sizeof(*devcd), gfp); //may sleep
> > dev_set_name
> > kobject_set_name_vargs
> > kvasprintf_const(GFP_KERNEL, ...); //may sleep
> > kstrdup(s, GFP_KERNEL); //may sleep
> >
> > This patch moves the operations that may sleep into a work item.
> > The work item will run in another kernel thread which is in
> > process context to execute the bottom half of the interrupt.
> > So it could prevent atomic context from sleeping.
> >
> > Fixes: f5ecd02a8b20 ("mwifiex: device dump support for usb interface")
> > Signed-off-by: Duoming Zhou <duoming@....edu.cn>
>
> mwifiex patches go to wireless-next, not net tree.
>
> > ---
> > Changes in v2:
> > - Fix compile problem.
>
> So you don't even compile test your patches? That's bad and in that case
> I'll just directly drop this. We expect that the patches are properly
> tested.
Ok, I will properly test this patch.
Best regards,
Duoming Zhou
Powered by blists - more mailing lists