title: i2c: cadence: fix reference leak when pm_runtime_get_sync fails
description: In the Linux kernel, the following vulnerability has been resolved:
i2c: cadence: fix reference leak when pm_runtime_get_sync fails
The PM reference count is not expected to be incremented on
return in functions cdns_i2c_master_xfer and cdns_reg_slave.
However, pm_runtime_get_sync will increment pm usage counter
even failed. Forgetting to putting operation will result in a
reference leak here.
Replace it with pm_runtime_resume_and_get to keep usage
counter balanced.
affected:
{
product: Linux
vendor: Linux
defaultStatus: unaffected
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
versions:
version: 7fa32329ca03, lessThan: 30410519328c, status: affected, versionType: git
version: 7fa32329ca03, lessThan: d57ff04e0ed6, status: affected, versionType: git
version: 7fa32329ca03, lessThan: a45fc41beed8, status: affected, versionType: git
version: 7fa32329ca03, lessThan: 23ceb8462dc6, status: affected, versionType: git
}
{
product: Linux
vendor: Linux
defaultStatus: affected
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
versions:
version: 4.5, status: affected
version: 0, lessThan: 4.5, status: unaffected, versionType: custom
version: 5.10.37, lessThanOrEqual: 5.10.*, status: unaffected, versionType: custom
version: 5.11.21, lessThanOrEqual: 5.11.*, status: unaffected, versionType: custom
version: 5.12.4, lessThanOrEqual: 5.12.*, status: unaffected, versionType: custom
version: 5.13, lessThanOrEqual: *, status: unaffected, versionType: original_commit_for_fix
}
