Skip to content

Commit

Permalink
usb: dwc3: core: memory ordering fix in close
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Oliver Neukum authored and Felipe Balbi committed Aug 31, 2012
1 parent c6f83f3 commit 2a540ed
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/dwc3/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2a540ed

Please sign in to comment.