linux/drivers/usb
Abhishek Pandit-Subedi 3aa56313b0 usb: typec: ucsi: Fix null pointer dereference in trace
[ Upstream commit 99516f76db ]

ucsi_register_altmode checks IS_ERR for the alt pointer and treats
NULL as valid. When CONFIG_TYPEC_DP_ALTMODE is not enabled,
ucsi_register_displayport returns NULL which causes a NULL pointer
dereference in trace. Rather than return NULL, call
typec_port_register_altmode to register DisplayPort alternate mode
as a non-controllable mode when CONFIG_TYPEC_DP_ALTMODE is not enabled.

Reviewed-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Signed-off-by: Jameson Thies <jthies@google.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240510201244.2968152-2-jthies@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-09-12 11:07:41 +02:00
..
atm usb: atm: cxacru: fix endpoint checking in cxacru_bind() 2024-07-05 09:14:47 +02:00
c67x00 usb/c67x00: Replace tasklet with work 2021-01-26 18:36:37 +01:00
cdns3 usb: cdnsp: fix for Link TRB with TC 2024-09-04 13:23:42 +02:00
chipidea usb: chipidea: wait controller resume finished for wakeup irq 2024-01-25 14:52:47 -08:00
class cdc-acm: Add DISABLE_ECHO quirk for GE HealthCare UI Controller 2024-09-04 13:23:41 +02:00
common usb: common: usb-conn-gpio: Prevent bailing out if initial role is none 2023-08-16 18:21:59 +02:00
core usb: core: sysfs: Unmerge @usb3_hardware_lpm_attr_group in remove_power_attributes() 2024-09-04 13:23:41 +02:00
dwc2 usb: dwc2: host: Fix dereference issue in DDMA completion flow. 2024-04-27 17:05:27 +02:00
dwc3 usb: dwc3: st: add missing depopulate in probe error path 2024-09-04 13:23:41 +02:00
early usb: early: xhci-dbc: Fix a potential out-of-bound memory access 2023-03-10 09:39:39 +01:00
gadget usb: gadget: fsl: Increase size of name buffer for endpoints 2024-09-04 13:23:26 +02:00
host xhci: Fix Panther point NULL pointer deref at full-speed re-enumeration 2024-09-04 13:23:15 +02:00
image USB: microtek: use set_host_byte() 2020-09-16 12:42:10 +02:00
isp1760 usb: isp1760: Fix out-of-bounds array access 2022-06-09 10:22:27 +02:00
misc usb: misc: uss720: check for incompatible versions of the Belkin F5U002 2024-07-05 09:14:28 +02:00
mon usb: mon: Fix atomicity violation in mon_bin_vma_fault 2024-01-25 14:52:47 -08:00
mtu3 usb: mtu3: fix kernel panic at qmu transfer done irq handler 2023-05-11 23:00:33 +09:00
musb usb: musb: da8xx: fix a resource leak in probe() 2024-07-05 09:14:47 +02:00
phy Revert "usb: phy: generic: Get the vbus supply" 2024-04-10 16:19:40 +02:00
renesas_usbhs usb: renesas: Fix refcount leak bug 2022-08-25 11:40:33 +02:00
roles usb: roles: don't get/set_role() when usb_role_switch is unregistered 2024-03-01 13:21:50 +01:00
serial USB: serial: option: add MeiG Smart SRM825L 2024-09-04 13:23:41 +02:00
storage usb-storage: alauda: Check whether the media is initialized 2024-07-05 09:14:23 +02:00
typec usb: typec: ucsi: Fix null pointer dereference in trace 2024-09-12 11:07:41 +02:00
usbip usbip: Don't submit special requests twice 2024-09-12 11:07:41 +02:00
Kconfig usb: remove reference to deleted config STB03xxx 2021-08-18 15:32:19 +02:00
Makefile usb: host: remove line for obsolete config USB_HWA_HCD 2021-08-18 15:32:19 +02:00
usb-skeleton.c USB: usb-skeleton: drop redundant in-urb check 2019-10-10 12:41:19 +02:00