linux-uconsole/drivers/usb/gadget/function
Dan Carpenter 4670e83917 usb: gadget: Potential NULL dereference on allocation error
[ Upstream commit df28169e15 ]

The source_sink_alloc_func() function is supposed to return error
pointers on error.  The function is called from usb_get_function() which
doesn't check for NULL returns so it would result in an Oops.

Of course, in the current kernel, small allocations always succeed so
this doesn't affect runtime.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-05 17:58:47 +01:00
..
f_acm.c
f_ecm.c usb: gadget: f_ecm: fix host mac address for multiple instances 2018-05-15 10:17:18 +03:00
f_eem.c
f_fs.c Revert "usb: gadget: ffs: Fix BUG when userland exits with submitted AIO transfers" 2018-12-13 09:16:11 +01:00
f_hid.c
f_loopback.c
f_mass_storage.c usb: gadget: storage: Fix Spectre v1 vulnerability 2018-10-17 20:57:55 +02:00
f_mass_storage.h usb: gadget: storage: Remove reference counting 2018-07-26 13:55:39 +03:00
f_midi.c - Introduce arithmetic overflow test helper functions (Rasmus) 2018-06-06 17:27:14 -07:00
f_ncm.c
f_obex.c
f_phonet.c usb: gadget: f_phonet: fix pn_net_xmit()'s return type 2018-05-21 10:36:14 +03:00
f_printer.c usb: gadget: function: printer: avoid wrong list handling in printer_write() 2018-05-24 18:14:28 +02:00
f_rndis.c
f_serial.c
f_sourcesink.c usb: gadget: Potential NULL dereference on allocation error 2019-03-05 17:58:47 +01:00
f_subset.c
f_tcm.c scsi: target: loop, usb, vhost, xen: use target_remove_session 2018-08-02 15:29:31 -04:00
f_uac1.c
f_uac1_legacy.c
f_uac2.c usb: gadget: f_uac2: fix endianness of 'struct cntrl_*_lay3' 2018-07-17 10:12:52 +03:00
f_uvc.c usb: gadget: uvc: Expose configuration name through video node 2018-07-26 13:43:18 +03:00
f_uvc.h usb: gadget: uvc: Minimize #include in headers 2018-07-26 13:33:44 +03:00
g_zero.h
Makefile
ndis.h
rndis.c USB: rndis: Fix for handling garbled messages 2018-05-15 10:24:28 +03:00
rndis.h
storage_common.c
storage_common.h
tcm.h
u_audio.c usb: gadget: u_audio: protect stream runtime fields with stream spinlock 2018-07-17 10:12:51 +03:00
u_audio.h
u_ecm.h
u_eem.h
u_ether.c usb: gadget: u_ether: fix unsafe list iteration 2018-12-17 09:24:38 +01:00
u_ether.h
u_ether_configfs.h
u_fs.h
u_gether.h
u_hid.h
u_midi.h
u_ncm.h
u_phonet.h
u_printer.h
u_rndis.h
u_serial.c
u_serial.h
u_tcm.h
u_uac1.h
u_uac1_legacy.c
u_uac1_legacy.h
u_uac2.h
u_uvc.h usb: gadget: uvc: Move trace parameter to function module 2018-07-26 13:33:48 +03:00
uvc.h usb: gadget: uvc: Minimize #include in headers 2018-07-26 13:33:44 +03:00
uvc_configfs.c usb: gadget: uvc: configfs: Move function to avoid forward declaration 2018-07-26 13:40:34 +03:00
uvc_configfs.h
uvc_queue.c
uvc_queue.h usb: gadget: uvc: Minimize #include in headers 2018-07-26 13:33:44 +03:00
uvc_v4l2.c usb: gadget: uvc: Minimize #include in headers 2018-07-26 13:33:44 +03:00
uvc_v4l2.h
uvc_video.c
uvc_video.h usb: gadget: uvc: Minimize #include in headers 2018-07-26 13:33:44 +03:00