浏览代码

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>
Oliver Neukum 13 年之前
父节点
当前提交
2a540edf7b
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/usb/dwc3/core.c

+ 1 - 0
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);