The patch titled
usb-gadget-ether: Prevent oops caused by error interrupt race -V2
(comments update)
has been added to the -mm tree. Its filename is
usb-gadget-ether-prevent-oops-caused-by-error-interrupt-race-v2-comments-update.patch
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this
------------------------------------------------------
Subject: usb-gadget-ether: Prevent oops caused by error interrupt race -V2
(comments update)
From: Benedikt Spranger <[EMAIL PROTECTED]>
eth_start_xmit() can race against a disconnect interrupt in the gadget
device driver, which nukes all pending request. Right now we access the
pending request list unconditionally and dereference the request list
head itself in such a case, which results in an Oops.
Check whether the list is empty before actually dereferencing
dev->tx_reqs.next. Also add a comment for the second list_empty check
further down to avoid confusion.
Long standing bug. Patch should be applied to stable as well.
Signed-off-by: Benedikt Spranger <[EMAIL PROTECTED]>
Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
Cc: David Brownell <[EMAIL PROTECTED]>
Cc: Greg KH <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
drivers/usb/gadget/ether.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff -puN
drivers/usb/gadget/ether.c~usb-gadget-ether-prevent-oops-caused-by-error-interrupt-race-v2-comments-update
drivers/usb/gadget/ether.c
---
a/drivers/usb/gadget/ether.c~usb-gadget-ether-prevent-oops-caused-by-error-interrupt-race-v2-comments-update
+++ a/drivers/usb/gadget/ether.c
@@ -1958,8 +1958,9 @@ static int eth_start_xmit (struct sk_buf
spin_lock_irqsave(&dev->req_lock, flags);
/*
- * dev->tx_reqs may be empty due to an error interrupt which
- * nuked all requests.
+ * dev->tx_reqs may be empty. We raced against a disconnect
+ * interrupt in the gadget device driver, which nuked all
+ * pending requests.
*/
if (list_empty(&dev->tx_reqs)) {
netif_stop_queue(net);
_
Patches currently in -mm which might be from [EMAIL PROTECTED] are
usb-gadget-ether-prevent-oops-caused-by-error-interrupt.patch
usb-gadget-ether-prevent-oops-caused-by-error-interrupt-race-v2-comments-update.patch
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html