diff options
author | Johan Hovold <johan@kernel.org> | 2019-10-22 16:32:02 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-28 17:46:23 +0100 |
commit | d98ee2a19c3334e9343df3ce254b496f1fc428eb (patch) | |
tree | aabc8dcb9f222d849ac229b534033c63a787393d /drivers/cpufreq/tegra20-cpufreq.c | |
parent | d482c7bb0541d19dea8bff437a9f3c5563b5b2d2 (diff) |
USB: ldusb: fix ring-buffer locking
The custom ring-buffer implementation was merged without any locking or
explicit memory barriers, but a spinlock was later added by commit
9d33efd9a791 ("USB: ldusb bugfix").
The lock did not cover the update of the tail index once the entry had
been processed, something which could lead to memory corruption on
weakly ordered architectures or due to compiler optimisations.
Specifically, a completion handler running on another CPU might observe
the incremented tail index and update the entry before ld_usb_read() is
done with it.
Fixes: 2824bd250f0b ("[PATCH] USB: add ldusb driver")
Fixes: 9d33efd9a791 ("USB: ldusb bugfix")
Cc: stable <stable@vger.kernel.org> # 2.6.13
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20191022143203.5260-2-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/cpufreq/tegra20-cpufreq.c')
0 files changed, 0 insertions, 0 deletions