[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20220314160000.77465-1-miquel.raynal@bootlin.com>
Date: Mon, 14 Mar 2022 17:00:00 +0100
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Xin Xiong <xiongx18@...an.edu.cn>,
Tudor Ambarus <tudor.ambarus@...rochip.com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Claudiu Beznea <claudiu.beznea@...rochip.com>,
Boris Brezillon <bbrezillon@...nel.org>,
linux-mtd@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc: yuanxzhang@...an.edu.cn, Xiyu Yang <xiyuyang19@...an.edu.cn>,
Xin Tan <tanxin.ctf@...il.com>
Subject: Re: [PATCH v4] mtd: rawnand: atmel: fix refcount issue in atmel_nand_controller_init
On Fri, 2022-03-04 at 08:53:32 UTC, Xin Xiong wrote:
> 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@...an.edu.cn>
> Signed-off-by: Xiyu Yang <xiyuyang19@...an.edu.cn>
> Co-developed-by: Xin Tan <tanxin.ctf@...il.com>
> Signed-off-by: Xin Tan <tanxin.ctf@...il.com>
> Signed-off-by: Xin Xiong <xiongx18@...an.edu.cn>
> Reviewed-by: Claudiu Beznea <claudiu.beznea@...rochip.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
Powered by blists - more mailing lists