linux-stable-rt/drivers/usb/gadget
Michal Nazarewicz b894f60a23 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>
2010-06-30 08:16:07 -07:00
..
Kconfig USB: s3c_hsotg: define USB_GADGET_DUALSPEED in Kconfig 2010-06-04 13:16:19 -07:00
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 usb/gadget: Replace the old USB audio FU definitions in f_audio.c 2010-06-01 07:42:03 +02:00
f_ecm.c
f_eem.c USB: gadget eth: Fix calculate CRC32 in EEM 2010-06-30 08:16:06 -07:00
f_fs.c
f_hid.c
f_loopback.c
f_mass_storage.c USB: gadget: f_mass_storage: stale common->fsg value bug fix 2010-06-30 08:16:07 -07:00
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 of/usb: fsl_qe_udc.c: fix build breakage 2010-06-02 21:02:40 -06:00
fsl_qe_udc.h
fsl_udc_core.c
fsl_usb2_udc.h
g_ffs.c USB: gadget: g_fs: possible invalid pointer reference bug fixed 2010-06-30 08:16:05 -07:00
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 usb: gadget: m66592-udc pio to mmio accessor conversion. 2010-06-02 16:26:13 +09:00
mass_storage.c
multi.c
ndis.h
net2280.c
net2280.h
nokia.c
omap_udc.c
omap_udc.h
printer.c USB: gadget/printer, fix sleep inside atomic 2010-06-30 08:16:06 -07:00
pxa25x_udc.c
pxa25x_udc.h
pxa27x_udc.c
pxa27x_udc.h
r8a66597-udc.c usb: gadget: r8a66597-udc pio to mmio accessor conversion. 2010-06-02 16:31:02 +09:00
r8a66597-udc.h usb: gadget: r8a66597-udc pio to mmio accessor conversion. 2010-06-02 16:31:02 +09:00
rndis.c
rndis.h
s3c-hsotg.c USB: s3c-hsotg: Ensure FIFOs are fully flushed after layout 2010-06-04 13:16:19 -07:00
s3c2410_udc.c USB: s3c2410: deactivate endpoints before gadget unbinding 2010-06-30 08:16:06 -07:00
s3c2410_udc.h
serial.c
storage_common.c sanitize vfs_fsync calling conventions 2010-05-21 18:31:21 -04:00
u_audio.c
u_audio.h
u_ether.c
u_ether.h
u_phonet.h
u_serial.c USB: g_serial: fix tty cleanup on unload 2010-06-30 08:16:05 -07:00
u_serial.h
usbstring.c
uvc.h
uvc_queue.c
uvc_queue.h
uvc_v4l2.c
uvc_video.c
webcam.c
zero.c