* [PATCH] USB: serial: ch341: GFP_KERNEL in reset_resume()
@ 2022-09-07 13:20 Oliver Neukum
2022-09-13 12:59 ` Johan Hovold
0 siblings, 1 reply; 2+ messages in thread
From: Oliver Neukum @ 2022-09-07 13:20 UTC (permalink / raw)
To: johan, linux-usb; +Cc: Oliver Neukum
All instances of reset_resume() are potential
parts of the block IO path. Use GFP_NOIO.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
drivers/usb/serial/ch341.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c
index af01a462cc43..3d4f68d58513 100644
--- a/drivers/usb/serial/ch341.c
+++ b/drivers/usb/serial/ch341.c
@@ -137,7 +137,7 @@ static int ch341_control_in(struct usb_device *dev,
r = usb_control_msg_recv(dev, 0, request,
USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
value, index, buf, bufsize, DEFAULT_TIMEOUT,
- GFP_KERNEL);
+ GFP_NOIO);
if (r) {
dev_err(&dev->dev, "failed to receive control message: %d\n",
r);
--
2.35.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] USB: serial: ch341: GFP_KERNEL in reset_resume()
2022-09-07 13:20 [PATCH] USB: serial: ch341: GFP_KERNEL in reset_resume() Oliver Neukum
@ 2022-09-13 12:59 ` Johan Hovold
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hovold @ 2022-09-13 12:59 UTC (permalink / raw)
To: Oliver Neukum; +Cc: linux-usb
On Wed, Sep 07, 2022 at 03:20:40PM +0200, Oliver Neukum wrote:
> All instances of reset_resume() are potential
> parts of the block IO path. Use GFP_NOIO.
Please be more verbose here. I have to think through this every time it
is brought up, and I'm not even sure it's actually an issue any more.
Furthermore, if this is indeed still a problem, then this should be
fixed in a central place using memalloc_noio_save().
> Signed-off-by: Oliver Neukum <oneukum@suse.com>
> ---
> drivers/usb/serial/ch341.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c
> index af01a462cc43..3d4f68d58513 100644
> --- a/drivers/usb/serial/ch341.c
> +++ b/drivers/usb/serial/ch341.c
> @@ -137,7 +137,7 @@ static int ch341_control_in(struct usb_device *dev,
And this helper is not only used in the reset path.
> r = usb_control_msg_recv(dev, 0, request,
> USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
> value, index, buf, bufsize, DEFAULT_TIMEOUT,
> - GFP_KERNEL);
> + GFP_NOIO);
> if (r) {
> dev_err(&dev->dev, "failed to receive control message: %d\n",
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-13 12:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-07 13:20 [PATCH] USB: serial: ch341: GFP_KERNEL in reset_resume() Oliver Neukum
2022-09-13 12:59 ` Johan Hovold
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).