diff options
author | Won Chung <wonchung@google.com> | 2022-04-18 17:59:31 +0000 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2022-04-29 12:17:22 +0300 |
commit | 84d4333c1e28cedfad37c5347b4a94a3565a454f (patch) | |
tree | dbf9dac7d5fbc5af6c119d1bad180a8600a29c4b /Documentation/ABI | |
parent | 9d2d0a5cf0ca063f417681cc33e767ce52615286 (diff) |
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>
Diffstat (limited to 'Documentation/ABI')
0 files changed, 0 insertions, 0 deletions