From: Greg KH <greg@kroah.com>
To: linux-usb-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB Fixes for 2.6.0-test11
Date: Wed, 10 Dec 2003 17:29:07 -0800 [thread overview]
Message-ID: <1071106147425@kroah.com> (raw)
In-Reply-To: <1071106147533@kroah.com>
ChangeSet 1.1524, 2003/12/09 17:40:44-08:00, herbert@gondor.apana.org.au
[PATCH] USB: Fix connect/disconnect race
This patch was integrated by you in 2.4 six months ago. Unfortunately
it never got into 2.5. Without it you can end up with crashes such
as http://bugs.debian.org/218670
drivers/usb/core/hub.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
--- a/drivers/usb/core/hub.c Wed Dec 10 16:47:01 2003
+++ b/drivers/usb/core/hub.c Wed Dec 10 16:47:01 2003
@@ -929,7 +929,6 @@
break;
}
- hub->children[port] = dev;
dev->state = USB_STATE_POWERED;
/* Reset the device, and detect its speed */
@@ -982,8 +981,10 @@
dev->dev.parent = dev->parent->dev.parent->parent;
/* Run it through the hoops (find a driver, etc) */
- if (!usb_new_device(dev, &hub->dev))
+ if (!usb_new_device(dev, &hub->dev)) {
+ hub->children[port] = dev;
goto done;
+ }
/* Free the configuration if there was an error */
usb_put_dev(dev);
@@ -992,7 +993,6 @@
delay = HUB_LONG_RESET_TIME;
}
- hub->children[port] = NULL;
hub_port_disable(hub, port);
done:
up(&usb_address0_sem);
next prev parent reply other threads:[~2003-12-11 1:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-11 1:27 [BK PATCH] USB Fixes for 2.6.0-test11 Greg KH
2003-12-11 1:29 ` [PATCH] " Greg KH
2003-12-11 1:29 ` Greg KH
2003-12-11 1:29 ` Greg KH
2003-12-11 1:29 ` Greg KH
2003-12-11 1:29 ` Greg KH
2003-12-11 1:29 ` Greg KH
2003-12-11 1:29 ` Greg KH
2003-12-11 1:29 ` Greg KH
2003-12-11 1:29 ` Greg KH [this message]
2003-12-11 1:29 ` Greg KH
2003-12-11 1:29 ` Greg KH
2003-12-11 17:56 ` [BK PATCH] Kobject Fix " Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1071106147425@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox