From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Liang Yang <liang.yang@amlogic.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Yixun Lan <yixun.lan@amlogic.com>,
Jianxin Pan <jianxin.pan@amlogic.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-mtd@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: meson: Fix a potential double free issue
Date: Thu, 9 Jun 2022 14:44:18 +0200 [thread overview]
Message-ID: <20220609124418.209251-1-miquel.raynal@bootlin.com> (raw)
In-Reply-To: <ec15c358b8063f7c50ff4cd628cf0d2e14e43f49.1653064877.git.christophe.jaillet@wanadoo.fr>
On Fri, 2022-05-20 at 16:41:40 UTC, Christophe JAILLET wrote:
> When meson_nfc_nand_chip_cleanup() is called, it will call:
> meson_nfc_free_buffer(&meson_chip->nand);
> nand_cleanup(&meson_chip->nand);
>
> nand_cleanup() in turn will call nand_detach() which calls the
> .detach_chip() which is here meson_nand_detach_chip().
>
> meson_nand_detach_chip() already calls meson_nfc_free_buffer(), so we
> could double free some memory.
>
> Fix it by removing the unneeded explicit call to meson_nfc_free_buffer().
>
> Fixes: 8fae856c5350 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Acked-by: Liang Yang <liang.yang@amlogic.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Liang Yang <liang.yang@amlogic.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Yixun Lan <yixun.lan@amlogic.com>,
Jianxin Pan <jianxin.pan@amlogic.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-mtd@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: meson: Fix a potential double free issue
Date: Thu, 9 Jun 2022 14:44:18 +0200 [thread overview]
Message-ID: <20220609124418.209251-1-miquel.raynal@bootlin.com> (raw)
In-Reply-To: <ec15c358b8063f7c50ff4cd628cf0d2e14e43f49.1653064877.git.christophe.jaillet@wanadoo.fr>
On Fri, 2022-05-20 at 16:41:40 UTC, Christophe JAILLET wrote:
> When meson_nfc_nand_chip_cleanup() is called, it will call:
> meson_nfc_free_buffer(&meson_chip->nand);
> nand_cleanup(&meson_chip->nand);
>
> nand_cleanup() in turn will call nand_detach() which calls the
> .detach_chip() which is here meson_nand_detach_chip().
>
> meson_nand_detach_chip() already calls meson_nfc_free_buffer(), so we
> could double free some memory.
>
> Fix it by removing the unneeded explicit call to meson_nfc_free_buffer().
>
> Fixes: 8fae856c5350 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Acked-by: Liang Yang <liang.yang@amlogic.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Liang Yang <liang.yang@amlogic.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Yixun Lan <yixun.lan@amlogic.com>,
Jianxin Pan <jianxin.pan@amlogic.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-mtd@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: meson: Fix a potential double free issue
Date: Thu, 9 Jun 2022 14:44:18 +0200 [thread overview]
Message-ID: <20220609124418.209251-1-miquel.raynal@bootlin.com> (raw)
In-Reply-To: <ec15c358b8063f7c50ff4cd628cf0d2e14e43f49.1653064877.git.christophe.jaillet@wanadoo.fr>
On Fri, 2022-05-20 at 16:41:40 UTC, Christophe JAILLET wrote:
> When meson_nfc_nand_chip_cleanup() is called, it will call:
> meson_nfc_free_buffer(&meson_chip->nand);
> nand_cleanup(&meson_chip->nand);
>
> nand_cleanup() in turn will call nand_detach() which calls the
> .detach_chip() which is here meson_nand_detach_chip().
>
> meson_nand_detach_chip() already calls meson_nfc_free_buffer(), so we
> could double free some memory.
>
> Fix it by removing the unneeded explicit call to meson_nfc_free_buffer().
>
> Fixes: 8fae856c5350 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Acked-by: Liang Yang <liang.yang@amlogic.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Liang Yang <liang.yang@amlogic.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Yixun Lan <yixun.lan@amlogic.com>,
Jianxin Pan <jianxin.pan@amlogic.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-mtd@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: meson: Fix a potential double free issue
Date: Thu, 9 Jun 2022 14:44:18 +0200 [thread overview]
Message-ID: <20220609124418.209251-1-miquel.raynal@bootlin.com> (raw)
In-Reply-To: <ec15c358b8063f7c50ff4cd628cf0d2e14e43f49.1653064877.git.christophe.jaillet@wanadoo.fr>
On Fri, 2022-05-20 at 16:41:40 UTC, Christophe JAILLET wrote:
> When meson_nfc_nand_chip_cleanup() is called, it will call:
> meson_nfc_free_buffer(&meson_chip->nand);
> nand_cleanup(&meson_chip->nand);
>
> nand_cleanup() in turn will call nand_detach() which calls the
> .detach_chip() which is here meson_nand_detach_chip().
>
> meson_nand_detach_chip() already calls meson_nfc_free_buffer(), so we
> could double free some memory.
>
> Fix it by removing the unneeded explicit call to meson_nfc_free_buffer().
>
> Fixes: 8fae856c5350 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Acked-by: Liang Yang <liang.yang@amlogic.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-06-09 12:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-20 16:41 [PATCH] mtd: rawnand: meson: Fix a potential double free issue Christophe JAILLET
2022-05-20 16:41 ` Christophe JAILLET
2022-05-20 16:41 ` Christophe JAILLET
2022-05-20 16:41 ` Christophe JAILLET
2022-05-26 5:34 ` Liang Yang
2022-05-26 5:34 ` Liang Yang
2022-05-26 5:34 ` Liang Yang
2022-05-26 5:34 ` Liang Yang
2022-06-09 12:44 ` Miquel Raynal [this message]
2022-06-09 12:44 ` Miquel Raynal
2022-06-09 12:44 ` Miquel Raynal
2022-06-09 12:44 ` Miquel Raynal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220609124418.209251-1-miquel.raynal@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=jbrunet@baylibre.com \
--cc=jianxin.pan@amlogic.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=khilman@baylibre.com \
--cc=liang.yang@amlogic.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=narmstrong@baylibre.com \
--cc=richard@nod.at \
--cc=vigneshr@ti.com \
--cc=yixun.lan@amlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.