cxl/hdm: Remove broken error path
stable inclusion from stable-v6.6.2 commit 6723e58d6f4abb6b6dd37953b6d890d29146b612 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8IW7G Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6723e58d6f4abb6b6dd37953b6d890d29146b612 -------------------------------- [ Upstream commit 5d09c63f11f083707b60c8ea0bb420651c47740f ] Dan reports that cxl_decoder_commit() potentially leaks a hold of cxl_dpa_rwsem. The potential error case is a "should not" happen scenario, turn it into a "can not" happen scenario by adding the error check to cxl_port_setup_targets() where other setting validation occurs. Reported-by:Dan Carpenter <dan.carpenter@linaro.org> Closes: http://lore.kernel.org/r/63295673-5d63-4919-b851-3b06d48734c0@moroto.mountain Reviewed-by:
Dave Jiang <dave.jiang@intel.com> Reviewed-by:
Ira Weiny <ira.weiny@intel.com> Fixes: 176baefb ("cxl/hdm: Commit decoder state to hardware") Signed-off-by:
Dan Williams <dan.j.williams@intel.com> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com>
Loading
Please sign in to comment