diff options
author | UCHINO Satoshi <satoshi.uchino@toshiba.co.jp> | 2013-05-23 11:10:11 +0900 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-06-10 17:10:34 +0300 |
commit | d68c277b501889b3a50c179d1c3d704db7947b83 (patch) | |
tree | 6d3b81f4a3279c32f353184dc744697b33f2f958 /drivers/usb/early | |
parent | eb127cb519d73c0d0e8089dcbde8c94dc1fc7e20 (diff) | |
download | linux-d68c277b501889b3a50c179d1c3d704db7947b83.tar.bz2 |
usb: gadget: f_mass_storage: add missing memory barrier for thread_wakeup_needed
Without this memory barrier, the file-storage thread may fail to
escape from the following while loop, because it may observe new
common->thread_wakeup_needed and old bh->state which are updated by
the callback functions.
/* Wait for the CBW to arrive */
while (bh->state != BUF_STATE_FULL) {
rc = sleep_thread(common);
if (rc)
return rc;
}
Cc: stable@vger.kernel.org
Signed-off-by: UCHINO Satoshi <satoshi.uchino@toshiba.co.jp>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/early')
0 files changed, 0 insertions, 0 deletions