summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/parse_data_structs.py
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2026-05-11 17:37:12 +0300
committerWolfram Sang <wsa+renesas@sang-engineering.com>2026-05-31 00:57:19 +0300
commitba14d7cf2fe7284610a29854bdff22b2537d3ce6 (patch)
tree720c126bd42846350473cc74788e2795752a0db5 /tools/lib/python/kdoc/parse_data_structs.py
parent3e2041ea586ae37fcea918ecb505ab9972a1201d (diff)
downloadlinux-ba14d7cf2fe7284610a29854bdff22b2537d3ce6.tar.xz
i2c: core: fix adapter registration race
Adapters can be looked up based on their id using i2c_get_adapter() which takes a reference to the embedded struct device. Make sure that the adapter (including its struct device) has been initialised before adding it to the IDR to avoid accessing uninitialised data which could, for example, lead to NULL-pointer dereferences or use-after-free. Note that the i2c-dev chardev, which is registered from a bus notifier, currently uses i2c_get_adapter() so the adapter needs to be added to the IDR before registration. Fixes: 6e13e6418418 ("i2c: Add i2c_add_numbered_adapter()") Cc: stable@vger.kernel.org # 2.6.22 Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Diffstat (limited to 'tools/lib/python/kdoc/parse_data_structs.py')
0 files changed, 0 insertions, 0 deletions