diff options
author | Johan Hovold <johan@kernel.org> | 2020-01-30 11:06:58 +0100 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2020-02-10 10:37:11 +0100 |
commit | 32553441569482e36e65371edb84494bcec53c03 (patch) | |
tree | 193e5d5e115f4b49f514feb5aa4565e692ac1b4d /drivers | |
parent | bb6d3fb354c5ee8d6bde2d576eb7220ea09862b9 (diff) | |
download | linux-stable-32553441569482e36e65371edb84494bcec53c03.tar.gz linux-stable-32553441569482e36e65371edb84494bcec53c03.tar.bz2 linux-stable-32553441569482e36e65371edb84494bcec53c03.zip |
USB: serial: relax unthrottle memory barrier
Commit a8d78d9f3856 ("USB: serial: clean up throttle handling")
converted the throttle handling to use atomic bitops. This means that we
can relax the smp_mb() in unthrottle() to smp_mb__after_atomic(), which
for example is a no-op on architectures like x86 that provide fully
ordered atomics.
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/serial/generic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 1be8bea372a2..546a1c2ce2f2 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c @@ -417,7 +417,7 @@ void usb_serial_generic_read_bulk_callback(struct urb *urb) /* * Make sure URB is marked as free before checking the throttled flag * to avoid racing with unthrottle() on another CPU. Matches the - * smp_mb() in unthrottle(). + * smp_mb__after_atomic() in unthrottle(). */ smp_mb__after_atomic(); @@ -489,7 +489,7 @@ void usb_serial_generic_unthrottle(struct tty_struct *tty) * Matches the smp_mb__after_atomic() in * usb_serial_generic_read_bulk_callback(). */ - smp_mb(); + smp_mb__after_atomic(); usb_serial_generic_submit_read_urbs(port, GFP_KERNEL); } |