i2c: qcom-cci: don't put a device tree node before i2c_add_adapter()
stable inclusion from stable-v5.10.102 commit e3fdbc40b7501f3822327d83e039e71d107117ff bugzilla: https://gitee.com/openeuler/kernel/issues/I567K6 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e3fdbc40b7501f3822327d83e039e71d107117ff -------------------------------- commit 02a4a696 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: e5175261 ("i2c: Add Qualcomm CCI I2C driver") Signed-off-by: NVladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Reviewed-by: NRobert Foss <robert.foss@linaro.org> Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NWolfram Sang <wsa@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYu Liao <liaoyu15@huawei.com> Reviewed-by: NWei Li <liwei391@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录