]> git.hungrycats.org Git - linux/commit
usb: gadget: f_fs: stop sleeping in ffs_func_eps_disable
authorMichal Nazarewicz <mina86@mina86.com>
Tue, 4 Oct 2016 00:07:34 +0000 (02:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Nov 2016 09:11:38 +0000 (10:11 +0100)
commit5cd8f6788ff34999dbd4cbec81a6adfc215e1e60
treeee7bc1b259b22d96374b350fd84ace3e1533cd31
parente2458382c792eb1be48ce3d604a37d1af9baa9f4
usb: gadget: f_fs: stop sleeping in ffs_func_eps_disable

commit a9e6f83c2df199187a5248f824f31b6787ae23ae upstream.

ffs_func_eps_disable is called from atomic context so it cannot sleep
thus cannot grab a mutex.  Change the handling of epfile->read_buffer
to use non-sleeping synchronisation method.

Reported-by: Chen Yu <chenyu56@huawei.com>
Signed-off-by: Michał Nazarewicz <mina86@mina86.com>
Fixes: 9353afbbfa7b ("buffer data from ‘oversized’ OUT requests")
Tested-by: John Stultz <john.stultz@linaro.org>
Tested-by: Chen Yu <chenyu56@huawei.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_fs.c