From: Oliver Neukum Date: Sun, 26 Aug 2012 19:34:19 +0000 (+0200) Subject: usb: dwc3: core: memory ordering fix in close X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2a540edf7bb02f3e968d1ce7cb355e740ba7de13;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Felipe Balbi --- 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) ret = test_bit(id, dwc3_devs); WARN(!ret, "dwc3: ID %d not in use\n", id); + smp_mb__before_clear_bit(); clear_bit(id, dwc3_devs); } EXPORT_SYMBOL_GPL(dwc3_put_device_id);