diff options
author | Xin Xiong <[email protected]> | 2021-10-09 12:19:18 +0800 |
---|---|---|
committer | Ulf Hansson <[email protected]> | 2021-10-12 10:23:25 +0200 |
commit | 8105c2abbf36296bf38ca44f55ee45d160db476a (patch) | |
tree | 2d1e95e7ebdc14a5355ec07c087d323a660dd3db /tools/testing/selftests/bpf/prog_tests/prog_array_init.c | |
parent | f83c18cc9edc8e1a556de2d7dad956ddd9f131b9 (diff) |
mmc: moxart: Fix reference count leaks in moxart_probe
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 <[email protected]>
Signed-off-by: Xiyu Yang <[email protected]>
Signed-off-by: Xin Tan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ulf Hansson <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions