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: v3.2.49~68 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c818402a62e9b82e5c8552479a2c56bb8cdca3d9;p=pandora-kernel.git usb: gadget: f_mass_storage: add missing memory barrier for thread_wakeup_needed commit d68c277b501889b3a50c179d1c3d704db7947b83 upstream. 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; } Signed-off-by: UCHINO Satoshi Acked-by: Michal Nazarewicz Signed-off-by: Felipe Balbi Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed