summaryrefslogtreecommitdiff
path: root/include/linux/rculist.h
diff options
context:
space:
mode:
authorXin Xiong <xiongx18@fudan.edu.cn>2022-03-04 11:53:32 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2022-03-14 18:58:41 +0300
commitfecbd4a317c95d73c849648c406bcf1b6a0ec1cf (patch)
tree0507cd7d8467640c36a5d2cacea556ec6d8622f4 /include/linux/rculist.h
parentfba6eb4fc4e6819d9684d378ace339c4212d5ce1 (diff)
downloadlinux-fecbd4a317c95d73c849648c406bcf1b6a0ec1cf.tar.xz
mtd: rawnand: atmel: fix refcount issue in atmel_nand_controller_init
The reference counting issue happens in several error handling paths on a refcounted object "nc->dmac". In these paths, the function simply returns the error code, forgetting to balance the reference count of "nc->dmac", increased earlier by dma_request_channel(), which may cause refcount leaks. Fix it by decrementing the refcount of specific object in those error paths. Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver") Co-developed-by: Xiyu Yang <xiyuyang19@fudan.edu.cn> Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn> Co-developed-by: Xin Tan <tanxin.ctf@gmail.com> Signed-off-by: Xin Tan <tanxin.ctf@gmail.com> Signed-off-by: Xin Xiong <xiongx18@fudan.edu.cn> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20220304085330.3610-1-xiongx18@fudan.edu.cn
Diffstat (limited to 'include/linux/rculist.h')
0 files changed, 0 insertions, 0 deletions