USB: serial: sierra: fix urb leak on write completion
Subsystems (3)
Johan Hovold
maintainerPATCH 1/1 USB: serial: sierra: fix urb leak on write completion
Make sure to drop the reference taken by usb_anchor_urb() also on successful submission of delayed write URBs during runtime resume to prevent them from leaking on completion.
Fixes e6929a9020ac ("USB: support for autosuspend in sierra while online")
Reported-by Wentao Liang <[email protected]>
Cc [email protected] # 2.6.32
Cc Oliver Neukum <[email protected]>
Signed-off-by Johan Hovold <[email protected]>
--- drivers/usb/serial/sierra.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/serial/sierra.c +2 -1
@@ -972,12 +972,13 @@ static int sierra_submit_delayed_urbs(struct usb_serial_port *port) intfdata->in_flight--;usb_unanchor_urb (urb);kfree (urb->transfer_buffer); -usb_free_urb (urb);spin_lock (&portdata->lock); portdata->outstanding_urbs--;spin_unlock (&portdata->lock); } + +usb_put_urb (urb); }if (ec)
Signature · 1 line
2.55.0
[email protected]
AI reviewSashiko has reviewed this patch and found no issues. It looks great!
Quoted 10 lines
Make sure to drop the reference taken by
usb_anchor_urb()also on successful submission of delayed write URBs during runtime resume to prevent them from leaking on completion.Fixes e6929a9020ac ("USB: support for autosuspend in sierra while online")Reported-by Wentao Liang <[email protected]>Cc [email protected] # 2.6.32Cc Oliver Neukum <[email protected]>Signed-off-by Johan Hovold <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 10 lines · Johan Hovold
Make sure to drop the reference taken by
usb_anchor_urb()also on successful submission of delayed write URBs during runtime resume to prevent them from leaking on completion.Fixes e6929a9020ac ("USB: support for autosuspend in sierra while online")Reported-by Wentao Liang <[email protected]>Cc [email protected] # 2.6.32Cc Oliver Neukum <[email protected]>Signed-off-by Johan Hovold <[email protected]>
Reviewed-by Greg Kroah-Hartman <[email protected]>