summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorXin Xiong <xiongx18@fudan.edu.cn>2021-10-09 07:19:18 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-18 21:16:15 +0300
commitd78de051ff328f98cd534d4bc1bfee1f4f829f61 (patch)
tree70f5f9537f1ea6142bf9ca5936fc8f1486df137e /lib
parente41d46fe0954ec4ae806f8b815bf70929d5c5657 (diff)
downloadlinux-d78de051ff328f98cd534d4bc1bfee1f4f829f61.tar.xz
mmc: moxart: Fix reference count leaks in moxart_probe
[ Upstream commit 8105c2abbf36296bf38ca44f55ee45d160db476a ] The issue happens in several error handling paths on two refcounted object related to the object "host" (dma_chan_rx, dma_chan_tx). In these paths, the function forgets to decrement one or both objects' reference count increased earlier by dma_request_chan(), causing reference count leaks. Fix it by balancing the refcounts of both objects in some error handling paths. In correspondence with the changes in moxart_probe(), IS_ERR() is replaced with IS_ERR_OR_NULL() in moxart_remove() as well. Signed-off-by: Xin Xiong <xiongx18@fudan.edu.cn> Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn> Signed-off-by: Xin Tan <tanxin.ctf@gmail.com> Link: https://lore.kernel.org/r/20211009041918.28419-1-xiongx18@fudan.edu.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions