USB: serial: ch341: GFP_KERNEL in reset_resume()
Subsystems (2)
PATCH 1/1 USB: serial: ch341: GFP_KERNEL in reset_resume()
All instances of reset_resume() are potential
parts of the block IO path. Use GFP_NOIO.
Signed-off-by Oliver Neukum <[email protected]>
--- drivers/usb/serial/ch341.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/serial/ch341.c +1 -1
@@ -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);
Signature · 1 line
2.35.3
Johan Hovold
maintainerQuoted 2 lines · Oliver Neukum
All instances of
reset_resume()are potential
parts of the block IO path. UseGFP_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().
drivers/usb/serial/ch341.c static int ch341_control_in(struct usb_device *dev,
Quoted 10 lines
Signed-off-by Oliver Neukum <[email protected]>--- drivers/usb/serial/ch341.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/serial/ch341.c +0
-0@@ -137,7 +137,7 @@ static int ch341_control_in(struct usb_device *dev,
And this helper is not only used in the reset path.
drivers/usb/serial/ch341.c static int ch341_control_in(struct usb_device *dev, · line 142
Quoted 7 lines
drivers/usb/serial/ch341.c +1
-1r =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