summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorMichal Nazarewicz <m.nazarewicz@samsung.com>2010-06-25 16:29:28 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-06-30 08:16:07 -0700
commitb894f60a232d552fc18b018271c2893f0b0c1c15 (patch)
treebfe023045f34f7af982bbde73a90f7b562976a2a /crypto
parente5fd39d9b80aaa0b8a16dd570fa55009905d6af4 (diff)
downloadblackbird-op-linux-b894f60a232d552fc18b018271c2893f0b0c1c15.tar.gz
blackbird-op-linux-b894f60a232d552fc18b018271c2893f0b0c1c15.zip
USB: gadget: f_mass_storage: stale common->fsg value bug fix
On fsg_unbind the common->fsg pointer was not NULLed if the unbound fsg_dev instance was the current one. As an effect, the incorrect pointer was preserved in all further operations which caused do_set_interface to reference an invalid region. This commit fixes this by raising an exception in fsg_bind which will change the common->fsg pointer. This also requires an wait queue so that the thread in fsg_bind can wait till the worker thread handles the exception. This commit removes also a config and new_config fields of fsg_common as they are no longer needed since fsg can be used to determine whether function is active or not. Moreover, this commit removes possible race condition where the fsg field was modified in both the worker thread and form various other contexts. This is fixed by replacing prev_fsg with new_fsg. At this point, fsg is assigned only in worker thread. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud