b894f60a23
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> |
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
amd5536udc.c | ||
amd5536udc.h | ||
at91_udc.c | ||
at91_udc.h | ||
atmel_usba_udc.c | ||
atmel_usba_udc.h | ||
audio.c | ||
cdc2.c | ||
ci13xxx_udc.c | ||
ci13xxx_udc.h | ||
composite.c | ||
config.c | ||
dummy_hcd.c | ||
epautoconf.c | ||
ether.c | ||
f_acm.c | ||
f_audio.c | ||
f_ecm.c | ||
f_eem.c | ||
f_fs.c | ||
f_hid.c | ||
f_loopback.c | ||
f_mass_storage.c | ||
f_obex.c | ||
f_phonet.c | ||
f_rndis.c | ||
f_serial.c | ||
f_sourcesink.c | ||
f_subset.c | ||
f_uvc.c | ||
f_uvc.h | ||
file_storage.c | ||
fsl_mxc_udc.c | ||
fsl_qe_udc.c | ||
fsl_qe_udc.h | ||
fsl_udc_core.c | ||
fsl_usb2_udc.h | ||
g_ffs.c | ||
g_zero.h | ||
gadget_chips.h | ||
gmidi.c | ||
goku_udc.c | ||
goku_udc.h | ||
hid.c | ||
imx_udc.c | ||
imx_udc.h | ||
inode.c | ||
langwell_udc.c | ||
langwell_udc.h | ||
lh7a40x_udc.c | ||
lh7a40x_udc.h | ||
m66592-udc.c | ||
m66592-udc.h | ||
mass_storage.c | ||
multi.c | ||
ndis.h | ||
net2280.c | ||
net2280.h | ||
nokia.c | ||
omap_udc.c | ||
omap_udc.h | ||
printer.c | ||
pxa25x_udc.c | ||
pxa25x_udc.h | ||
pxa27x_udc.c | ||
pxa27x_udc.h | ||
r8a66597-udc.c | ||
r8a66597-udc.h | ||
rndis.c | ||
rndis.h | ||
s3c-hsotg.c | ||
s3c2410_udc.c | ||
s3c2410_udc.h | ||
serial.c | ||
storage_common.c | ||
u_audio.c | ||
u_audio.h | ||
u_ether.c | ||
u_ether.h | ||
u_phonet.h | ||
u_serial.c | ||
u_serial.h | ||
usbstring.c | ||
uvc.h | ||
uvc_queue.c | ||
uvc_queue.h | ||
uvc_v4l2.c | ||
uvc_video.c | ||
webcam.c | ||
zero.c |