diff options
author | Oliver Neukum <oliver@neukum.org> | 2012-08-26 15:34:19 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-08-31 05:25:21 -0400 |
commit | 2a540edf7bb02f3e968d1ce7cb355e740ba7de13 (patch) | |
tree | 13a0b718c53bd92a85ccb1385712a362bb2c451e /drivers/usb/dwc3 | |
parent | c6f83f386c2f7987a344368e33e55840c12bd38f (diff) |
usb: dwc3: core: memory ordering fix in close
As a bitmap is used for free/used. As a device freed
all memory operations must be scheduled before the bitmap
is manipulated.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 4f2ef5345392..08a5738a6e1b 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c | |||
@@ -99,6 +99,7 @@ void dwc3_put_device_id(int id) | |||
99 | 99 | ||
100 | ret = test_bit(id, dwc3_devs); | 100 | ret = test_bit(id, dwc3_devs); |
101 | WARN(!ret, "dwc3: ID %d not in use\n", id); | 101 | WARN(!ret, "dwc3: ID %d not in use\n", id); |
102 | smp_mb__before_clear_bit(); | ||
102 | clear_bit(id, dwc3_devs); | 103 | clear_bit(id, dwc3_devs); |
103 | } | 104 | } |
104 | EXPORT_SYMBOL_GPL(dwc3_put_device_id); | 105 | EXPORT_SYMBOL_GPL(dwc3_put_device_id); |