linux/drivers/usb/gadget
Alan Stern 511f3c5326 usb: gadget: udc-core: fix a regression during gadget driver unbinding
This patch (as1666) fixes a regression in the UDC core.  The core
takes care of unbinding gadget drivers, and it does the unbinding
before telling the UDC driver to turn off the controller hardware.
When the call to the udc_stop callback is made, the gadget no longer
has a driver.  The callback routine should not be invoked with a
pointer to the old driver; doing so can cause problems (such as
use-after-free accesses in net2280).

This patch should be applied, with appropriate context changes, to all
the stable kernels going back to 3.1.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: <stable@vger.kernel.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-20 16:46:33 +02:00
..
acm_ms.c usb: gadget: acm_ms: use function framework for ACM 2013-01-21 20:52:44 +02:00
amd5536udc.c usb: gadget: patches for v3.9 merge window 2013-01-25 09:08:05 -08:00
amd5536udc.h usb: gadget: amd5536udc: convert to udc_start/udc_stop 2013-01-24 21:11:17 +02:00
at91_udc.c USB patches for 3.9-rc1 2013-02-21 12:20:00 -08:00
at91_udc.h
atmel_usba_udc.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-02-26 20:16:07 -08:00
atmel_usba_udc.h
audio.c usb: gadget: remove usb_gadget_controller_number() 2012-09-10 16:43:24 +03:00
bcm63xx_udc.c usb: Convert to devm_ioremap_resource() 2013-01-22 11:41:58 -08:00
cdc2.c usb: gadget: cdc2: use function framework for ACM 2013-01-21 20:52:45 +02:00
composite.c usb: gadget: composite: fix kernel-doc warnings 2013-03-05 13:15:00 +02:00
config.c usb: gadget: always update HS/SS descriptors and create a copy of them 2012-10-31 15:09:44 +02:00
dbgp.c usb: gadget: allocate & giveback serial ports instead hard code them 2013-01-21 20:52:43 +02:00
dummy_hcd.c usb: gadget: dummy: fix enumeration with g_multi 2012-12-13 11:58:46 +02:00
epautoconf.c usb: gadget: libcomposite: add epautoconf.c to libcomposite 2012-09-10 15:37:51 +03:00
ether.c usb: gadget: remove usb_gadget_controller_number() 2012-09-10 16:43:24 +03:00
f_acm.c usb: gadget: f_acm: use usb_gstrings_attach() 2013-01-21 20:52:48 +02:00
f_ecm.c usb: gadget: let f_* use usb_string_ids_tab() where it makes sense 2012-10-31 15:11:47 +02:00
f_eem.c usb: gadget: always update HS/SS descriptors and create a copy of them 2012-10-31 15:09:44 +02:00
f_fs.c Merge 3.8-rc5 into usb-next 2013-01-25 12:41:02 -08:00
f_hid.c usb: gadget: always update HS/SS descriptors and create a copy of them 2012-10-31 15:09:44 +02:00
f_loopback.c usb: gadget: convert source sink and loopback to new function interface 2013-01-21 20:52:40 +02:00
f_mass_storage.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-02-26 20:16:07 -08:00
f_midi.c usb: gadget: always update HS/SS descriptors and create a copy of them 2012-10-31 15:09:44 +02:00
f_ncm.c usb: gadget: ncm: make global variable ndp*_opts read only 2013-01-10 12:25:12 +02:00
f_obex.c usb: gadget: allocate & giveback serial ports instead hard code them 2013-01-21 20:52:43 +02:00
f_phonet.c usb: gadget: always update HS/SS descriptors and create a copy of them 2012-10-31 15:09:44 +02:00
f_rndis.c usb: gadget: let f_* use usb_string_ids_tab() where it makes sense 2012-10-31 15:11:47 +02:00
f_serial.c usb: gadget: allocate & giveback serial ports instead hard code them 2013-01-21 20:52:43 +02:00
f_sourcesink.c usb: gadget: convert source sink and loopback to new function interface 2013-01-21 20:52:40 +02:00
f_subset.c usb: gadget: let f_* use usb_string_ids_tab() where it makes sense 2012-10-31 15:11:47 +02:00
f_uac1.c usb: gadget: f_uac1: silence an info leak warning 2013-03-04 13:13:58 +02:00
f_uac2.c usb: gadget: f_uac2: fix compile warning 2013-01-21 20:52:49 +02:00
f_uvc.c drivers/usb/gadget: using strlcpy instead of strncpy 2013-02-06 11:38:13 -08:00
f_uvc.h usb: gadget: uvc: Add super-speed support to UVC webcam gadget 2012-06-04 18:12:36 +03:00
fsl_mxc_udc.c usb: gadget: fsl_mxc_udc: replace MX35_IO_ADDRESS to ioremap 2013-01-18 14:08:21 +02:00
fsl_qe_udc.c usb: gadget: constify all struct usb_gadget_ops 2013-01-24 21:11:35 +02:00
fsl_qe_udc.h usb: gadget: Complete fsl qe/udc driver conversion 2012-06-12 13:32:29 +03:00
fsl_udc_core.c Merge 3.8-rc5 into usb-next 2013-01-25 12:41:02 -08:00
fsl_usb2_udc.h usb: gadget: fsl_mxc_udc: replace MX35_IO_ADDRESS to ioremap 2013-01-18 14:08:21 +02:00
functions.c usb: gadget: add a forward pointer from usb_function to its "instance" 2013-01-21 20:52:46 +02:00
fusb300_udc.c USB patches for 3.9-rc1 2013-02-21 12:20:00 -08:00
fusb300_udc.h usb: gadget: fusb300_udc: convert to udc_start/udc_stop 2013-01-24 21:11:28 +02:00
g_ffs.c usb: gadget: libcomposite: move composite.c into libcomposite 2012-09-10 16:13:03 +03:00
g_zero.h usb: gadget: convert source sink and loopback to new function interface 2013-01-21 20:52:40 +02:00
gadget_chips.h usb: gadget: remove usb_gadget_controller_number() 2012-09-10 16:43:24 +03:00
gmidi.c usb: gadget: consider link speed for bMaxPower 2013-01-10 12:38:52 +02:00
goku_udc.c usb: gadget: goku_udc: convert to udc_start/udc_stop 2013-01-24 21:11:28 +02:00
goku_udc.h usb: gadget: goku_udc: convert to udc_start/udc_stop 2013-01-24 21:11:28 +02:00
hid.c usb: remove use of __devexit 2012-11-21 13:27:17 -08:00
imx_udc.c usb: gadget: imx_udc: fix gadget->dev registration 2013-03-04 09:33:28 +02:00
imx_udc.h
inode.c usb: gadget: remove DMA_ADDR_INVALID from f_uac2 and gadgetfs 2012-10-31 15:10:06 +02:00
Kconfig tty/serial patches for 3.9-rc1 2013-02-21 13:41:04 -08:00
lpc32xx_udc.c usb: converto drivers/usb/* to use module_platform_driver_probe() 2013-01-17 17:39:34 -08:00
m66592-udc.c USB patches for 3.9-rc1 2013-02-21 12:20:00 -08:00
m66592-udc.h usb: gadget: m66592-udc: convert to udc_start/udc_stop 2013-01-24 21:11:29 +02:00
Makefile usb: gadget: make usb functions to load before gadget driver 2013-03-04 09:33:26 +02:00
mass_storage.c usb: gadget: libcomposite: move composite.c into libcomposite 2012-09-10 16:13:03 +03:00
multi.c usb: gadget: multi: use function framework for ACM 2013-01-21 20:52:45 +02:00
mv_u3d_core.c usb: remove use of __devexit 2012-11-21 13:27:17 -08:00
mv_u3d.h usb: gadget: mv: Add USB 3.0 device driver for Marvell PXA2128 chip. 2012-06-22 13:08:21 +03:00
mv_udc_core.c usb: gadget: patches for v3.9 merge window 2013-01-25 09:08:05 -08:00
mv_udc.h
ncm.c usb: gadget: remove usb_gadget_controller_number() 2012-09-10 16:43:24 +03:00
ndis.h
net2272.c usb: gadget: net22xx: fix ->disconnect reporting 2013-03-20 16:46:28 +02:00
net2272.h
net2280.c usb: gadget: net22xx: fix ->disconnect reporting 2013-03-20 16:46:28 +02:00
net2280.h
nokia.c usb: gadget: f_acm: convert to new function interface with backwards compatibility 2013-01-21 20:52:43 +02:00
omap_udc.c usb: gadget: constify all struct usb_gadget_ops 2013-01-24 21:11:35 +02:00
omap_udc.h
pch_udc.c usb: gadget: pch_udc: convert to udc_start/udc_stop 2013-01-24 21:11:30 +02:00
printer.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
pxa25x_udc.c usb: gadget: pxa25x: fix disconnect reporting 2013-03-11 12:40:31 +02:00
pxa25x_udc.h usb: gadget: pxa25x_udc: convert to udc_start/udc_stop 2013-01-24 21:11:31 +02:00
pxa27x_udc.c usb: gadget: pxa27x: fix gadget->dev registration 2013-03-04 09:33:26 +02:00
pxa27x_udc.h usb: gadget: pxa27x_udc: convert to udc_start/udc_stop 2013-01-24 21:11:31 +02:00
r8a66597-udc.c USB patches for 3.9-rc1 2013-02-21 12:20:00 -08:00
r8a66597-udc.h gadget/r8a66597: remove conditional compilation of clk code 2012-07-30 17:25:12 -07:00
rndis.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
rndis.h
s3c2410_udc.c usb: gadget: s3c2410: fix build breakage 2013-03-04 09:33:29 +02:00
s3c2410_udc.h usb: gadget: s3c2410: convert to udc_start/udc_stop 2013-01-24 21:11:32 +02:00
s3c-hsotg.c USB patches for 3.9-rc1 2013-02-21 12:20:00 -08:00
s3c-hsotg.h
s3c-hsudc.c USB patches for 3.9-rc1 2013-02-21 12:20:00 -08:00
serial.c usb: gadget: f_acm: convert to new function interface with backwards compatibility 2013-01-21 20:52:43 +02:00
storage_common.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-02-26 20:16:07 -08:00
tcm_usb_gadget.c usb: gadget: tcm_usb_gadge: fix to return error or 0 in tcm_usbg_drop_nexus() 2012-12-13 12:04:00 +02:00
tcm_usb_gadget.h usb: gadget: make sure each gadget is using same index for Product, Serial,… 2012-09-10 16:13:00 +03:00
u_ether.c ethtool: fix drvinfo strings set in drivers 2013-01-06 21:06:31 -08:00
u_ether.h
u_phonet.h
u_serial.c usb: gadget: u_serial: fix typo which cause build warning 2013-03-14 12:47:53 +02:00
u_serial.h usb: gadget: f_acm: convert to new function interface with backwards compatibility 2013-01-21 20:52:43 +02:00
u_uac1.c usb: gadget: u_uac1: NULL dereference on error path 2013-03-04 13:16:45 +02:00
u_uac1.h
udc-core.c usb: gadget: udc-core: fix a regression during gadget driver unbinding 2013-03-20 16:46:33 +02:00
usbstring.c usb: gadget: libcomposite: move MODULE_VERSION to composite.c 2012-09-10 16:13:03 +03:00
uvc_queue.c
uvc_queue.h
uvc_v4l2.c
uvc_video.c
uvc.h usb: gadget: uvc: Add super-speed support to UVC webcam gadget 2012-06-04 18:12:36 +03:00
webcam.c usb: gadget: consider link speed for bMaxPower 2013-01-10 12:38:52 +02:00
zero.c usb: gadget: fix two sparse warnings 2013-01-21 20:52:49 +02:00