linux-stable/include/linux/usb
RD Babiera d49547950b usb: typec: bus: verify partner exists in typec_altmode_attention
commit f236433064 upstream.

Some usb hubs will negotiate DisplayPort Alt mode with the device
but will then negotiate a data role swap after entering the alt
mode. The data role swap causes the device to unregister all alt
modes, however the usb hub will still send Attention messages
even after failing to reregister the Alt Mode. type_altmode_attention
currently does not verify whether or not a device's altmode partner
exists, which results in a NULL pointer error when dereferencing
the typec_altmode and typec_altmode_ops belonging to the altmode
partner.

Verify the presence of a device's altmode partner before sending
the Attention message to the Alt Mode driver.

Fixes: 8a37d87d72 ("usb: typec: Bus type for alternate modes")
Cc: stable@vger.kernel.org
Signed-off-by: RD Babiera <rdbabiera@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230814180559.923475-1-rdbabiera@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-13 09:48:43 +02:00
..
audio-v2.h USB: Follow-up to SPDX identifiers addition - remove now useless comments 2022-06-10 11:24:36 +02:00
audio-v3.h
audio.h USB: Follow-up to SPDX identifiers addition - remove now useless comments 2022-06-10 11:24:36 +02:00
c67x00.h USB: Follow-up to SPDX GPL-2.0+ identifiers addition - remove now useless comments 2022-06-10 11:24:37 +02:00
ccid.h
cdc-wdm.h USB: Follow-up to SPDX identifiers addition - remove now useless comments 2022-06-10 11:24:36 +02:00
cdc.h USB: Follow-up to SPDX identifiers addition - remove now useless comments 2022-06-10 11:24:36 +02:00
cdc_ncm.h net/cdc_ncm: Increase NTB max RX/TX values to 64kb 2022-07-21 13:20:28 +02:00
ch9.h
chipidea.h usb: chipidea: Add support for VBUS control with PHY 2022-08-31 09:07:52 +02:00
composite.h usb: gadget: drop superfluous ':' in doc string 2023-05-13 18:04:59 +09:00
ehci-dbgp.h
ehci_def.h USB: Follow-up to SPDX GPL-2.0+ identifiers addition - remove now useless comments 2022-06-10 11:24:37 +02:00
ehci_pdriver.h USB: Follow-up to SPDX GPL-2.0+ identifiers addition - remove now useless comments 2022-06-10 11:24:37 +02:00
ezusb.h
functionfs.h
g_hid.h USB: Follow-up to SPDX GPL-2.0+ identifiers addition - remove now useless comments 2022-06-10 11:24:37 +02:00
gadget.h usb: gadget: Add function wakeup support 2023-03-29 10:27:01 +02:00
gadget_configfs.h
hcd.h USB: Extend pci resume function to handle PM events 2023-07-19 16:36:26 +02:00
input.h USB: Follow-up to SPDX identifiers addition - remove now useless comments 2022-06-10 11:24:36 +02:00
iowarrior.h
irda.h
isp116x.h
isp1301.h USB: Follow-up to SPDX identifiers addition - remove now useless comments 2022-06-10 11:24:36 +02:00
isp1362.h
m66592.h USB: Follow-up to SPDX identifiers addition - remove now useless comments 2022-06-10 11:24:36 +02:00
musb-ux500.h USB: Follow-up to SPDX GPL-2.0+ identifiers addition - remove now useless comments 2022-06-10 11:24:37 +02:00
musb.h ARM/musb: omap2: Remove global GPIO numbers from TUSB6010 2023-07-19 16:35:48 +02:00
net2280.h USB: Follow-up to SPDX GPL-2.0+ identifiers addition - remove now useless comments 2022-06-10 11:24:37 +02:00
of.h USB: Follow-up to SPDX identifiers addition - remove now useless comments 2022-06-10 11:24:36 +02:00
ohci_pdriver.h USB: Follow-up to SPDX GPL-2.0+ identifiers addition - remove now useless comments 2022-06-10 11:24:37 +02:00
onboard_hub.h usb: misc: Add onboard_usb_hub driver 2022-07-08 14:53:50 +02:00
otg-fsm.h USB: Follow-up to SPDX GPL-2.0+ identifiers addition - remove now useless comments 2022-06-10 11:24:37 +02:00
otg.h
pd.h usb: typec: Separate USB Power Delivery from USB Type-C 2022-06-12 06:49:47 +02:00
pd_ado.h
pd_bdo.h
pd_ext_sdb.h
pd_vdo.h
phy.h
phy_companion.h USB: Follow-up to SPDX GPL-2.0+ identifiers addition - remove now useless comments 2022-06-10 11:24:37 +02:00
quirks.h
r8a66597.h USB: Follow-up to SPDX identifiers addition - remove now useless comments 2022-06-10 11:24:36 +02:00
r8152.h
renesas_usbhs.h
rndis_host.h USB: Follow-up to SPDX GPL-2.0+ identifiers addition - remove now useless comments 2022-06-10 11:24:37 +02:00
role.h Revert "usb: common: usb-conn-gpio: Set last role to unknown before initial detection" 2023-07-19 16:36:36 +02:00
rzv2m_usb3drd.h usb: gadget: Add support for RZ/V2M USB3DRD driver 2023-01-25 15:48:16 +01:00
serial.h USB: mark all struct bus_type as const 2023-03-23 13:22:00 +01:00
sl811.h
storage.h USB: Follow-up to SPDX identifiers addition - remove now useless comments 2022-06-10 11:24:36 +02:00
tcpci.h usb: typec: tcpci: clear the fault status bit 2023-09-06 21:25:33 +01:00
tcpm.h usb: typec: tcpm: Add callbacks to mitigate wakeups due to contaminant 2023-01-17 17:29:23 +01:00
tegra_usb_phy.h USB: Follow-up to SPDX identifiers addition - remove now useless comments 2022-06-10 11:24:36 +02:00
typec.h usb: typec: Add partner PD object wrapper 2022-11-29 08:56:09 +01:00
typec_altmode.h usb: typec: bus: verify partner exists in typec_altmode_attention 2023-09-13 09:48:43 +02:00
typec_dp.h usb: typec: altmodes/displayport: correct pin assignment for UFP receptacles 2022-08-18 21:20:07 +02:00
typec_mux.h usb: typec: mux: Add CONFIG guards for functions 2022-06-21 16:38:14 +02:00
typec_retimer.h usb: typec: Add support for retimers 2022-07-14 16:24:05 +02:00
typec_tbt.h
uas.h
ulpi.h USB: Follow-up to SPDX identifiers addition - remove now useless comments 2022-06-10 11:24:36 +02:00
usb338x.h USB: Follow-up to SPDX GPL-2.0+ identifiers addition - remove now useless comments 2022-06-10 11:24:37 +02:00
usb_phy_generic.h
usbnet.h SPDX changes for 6.0-rc1 2022-08-04 12:12:54 -07:00
uvc.h usb: uvc: use v4l2_fill_fmtdesc instead of open coded format name 2023-01-31 09:40:43 +01:00
webusb.h usb: gadget: Use correct APIs and data types for UUID handling 2023-01-31 10:37:29 +01:00
xhci-dbgp.h USB: Follow-up to SPDX identifiers addition - remove now useless comments 2022-06-10 11:24:36 +02:00