From: UCHINO Satoshi Date: Thu, 23 May 2013 02:10:11 +0000 (+0900) Subject: usb: gadget: f_mass_storage: add missing memory barrier for thread_wakeup_needed X-Git-Tag: omap-for-v3.11/fixes-for-merge-window~78^2~60^2~45 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d68c277b501889b3a50c179d1c3d704db7947b83;p=pandora-kernel.git 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 Acked-by: Michal Nazarewicz Signed-off-by: Felipe Balbi --- Reading git-diff-tree failed