]> Pileus Git - ~andy/linux/commitdiff
usb: dwc3: core: memory ordering fix in close
authorOliver Neukum <oliver@neukum.org>
Sun, 26 Aug 2012 19:34:19 +0000 (21:34 +0200)
committerFelipe Balbi <balbi@ti.com>
Fri, 31 Aug 2012 09:25:21 +0000 (12:25 +0300)
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>
drivers/usb/dwc3/core.c

index 4f2ef5345392026c7d12e8a24e04376c04acac33..08a5738a6e1bb96f0e0f78888be3e5f639a41071 100644 (file)
@@ -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);