linux/drivers/misc/mei
Won Chung 84d4333c1e misc/mei: Add NULL check to component match callback functions
Currently, component_match callback functions used in mei refers to the
driver name, assuming that the component device being matched has a
driver bound. It can cause a NULL pointer dereference when a device
without a driver bound registers a component. This is due to the nature
of the component framework where all registered components are matched
in any component_match callback functions. So even if a component is
registered by a totally irrelevant device, that component is also
shared to these callbacks for i915 driver.

To prevent totally irrelevant device being matched for i915 and causing
a NULL pointer dereference for checking driver name, add a NULL check on
dev->driver to check if there is a driver bound before checking the
driver name.

In the future, the string compare on the driver name, "i915" may need to
be refactored too.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Prashant Malani <pmalani@chromium.org>
Signed-off-by: Won Chung <wonchung@google.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2022-04-29 12:17:22 +03:00
..
hdcp misc/mei: Add NULL check to component match callback functions 2022-04-29 12:17:22 +03:00
pxp misc/mei: Add NULL check to component match callback functions 2022-04-29 12:17:22 +03:00
bus-fixup.c mei: fix kdoc in the driver 2021-06-22 12:40:31 +02:00
bus.c mei: bus: add client dma interface 2021-11-26 18:31:46 +02:00
client.c mei: me: avoid link reset on shutdown 2022-02-25 12:14:01 +01:00
client.h mei: constify passed buffers and structures 2021-07-29 17:08:04 +02:00
debugfs.c mei: add support for client dma capability 2021-02-06 15:48:11 +01:00
dma-ring.c mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
hbm.c mei: hbm: fix client dma reply status 2021-12-30 14:12:16 +01:00
hbm.h mei: implement client dma setup. 2021-02-06 15:48:11 +01:00
hw-me-regs.h mei: me: add Alder Lake N device id. 2022-03-18 13:48:16 +01:00
hw-me.c mei: me: fix reset policy on read error in interrupt 2022-02-25 12:14:01 +01:00
hw-me.h mei: add device kind to sysfs 2020-07-29 16:21:13 +02:00
hw-txe-regs.h mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
hw-txe.c mei: Remove some dead code 2021-12-03 14:26:33 +01:00
hw-txe.h mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
hw.h mei: bus: add client dma interface 2021-11-26 18:31:46 +02:00
init.c mei: do not overwrite state on hw start 2022-02-25 12:14:01 +01:00
interrupt.c mei: avoid iterator usage outside of list_for_each_entry 2022-03-18 13:48:30 +01:00
Kconfig mei: pxp: export pavp client to me client bus 2021-10-04 13:10:17 -04:00
main.c mei: fix kdoc in the driver 2021-06-22 12:40:31 +02:00
Makefile mei: pxp: export pavp client to me client bus 2021-10-04 13:10:17 -04:00
mei_dev.h mei: constify passed buffers and structures 2021-07-29 17:08:04 +02:00
mei-trace.c mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
mei-trace.h treewide: Add missing semicolons to __assign_str uses 2021-06-30 09:19:14 -04:00
pci-me.c mei: me: add Alder Lake N device id. 2022-03-18 13:48:16 +01:00
pci-txe.c mei: Remove usage of the deprecated "pci-dma-compat.h" API 2021-09-21 17:33:41 +02:00