]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
i2c: qcom-cci: don't put a device tree node before i2c_add_adapter()
authorVladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Thu, 3 Feb 2022 16:47:03 +0000 (18:47 +0200)
committerPaolo Pisati <paolo.pisati@canonical.com>
Mon, 7 Mar 2022 10:44:18 +0000 (11:44 +0100)
commitde666e9ea8bc9b2c9f7f0bb1dce7609006384964
tree3cbe94380a4b3ed36f2bb26a8d4d877f1a93a6cd
parent79ac7767beeabec3f11a58a267c8c3869e200e66
i2c: qcom-cci: don't put a device tree node before i2c_add_adapter()

BugLink: https://bugs.launchpad.net/bugs/1963890
commit 02a4a69667a2ad32f3b52ca906f19628fbdd8a01 upstream.

There is a minor chance for a race, if a pointer to an i2c-bus subnode
is stored and then reused after releasing its reference, and it would
be sufficient to get one more reference under a loop over children
subnodes.

Fixes: e517526195de ("i2c: Add Qualcomm CCI I2C driver")
Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/i2c/busses/i2c-qcom-cci.c