diff options
| author | Alan Stern <stern@rowland.harvard.edu> | 2017-09-21 16:12:01 -0400 |
|---|---|---|
| committer | Ben Hutchings <ben@decadent.org.uk> | 2018-01-01 20:51:37 +0000 |
| commit | 2f8ef6bcb74f9b1f245d2fd452c868ba031b7de9 (patch) | |
| tree | 139a8e28e54d1172e62318c07f66a98a8a74828d /include/linux/stringify.h | |
| parent | 8a2be85a962b1f444ac3e1df6567dc2cac3d33b1 (diff) | |
USB: gadgetfs: fix copy_to_user while holding spinlock
commit 6e76c01e71551cb221c1f3deacb9dcd9a7346784 upstream.
The gadgetfs driver as a long-outstanding FIXME, regarding a call of
copy_to_user() made while holding a spinlock. This patch fixes the
issue by dropping the spinlock and using the dev->udc_usage mechanism
introduced by another recent patch to guard against status changes
while the lock isn't held.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'include/linux/stringify.h')
0 files changed, 0 insertions, 0 deletions
