From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
To: Aaro Koskinen <aaro.koskinen@iki.fi>,
Kyungmin Park <kyungmin.park@samsung.com>,
David Woodhouse <dwmw2@infradead.org>,
linux-mtd@lists.infradead.org
Subject: Re: [PATCH v2] mtd: onenand: fix deadlock in onenand_block_markbad
Date: Wed, 24 Feb 2016 13:59:56 +0200 [thread overview]
Message-ID: <1456315196.4719.4.camel@linux.intel.com> (raw)
In-Reply-To: <1456000068-8862-1-git-send-email-aaro.koskinen@iki.fi>
Looks good, thanks!
Acked-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
On Sat, 2016-02-20 at 22:27 +0200, Aaro Koskinen wrote:
> Commit 5942ddbc500d ("mtd: introduce mtd_block_markbad interface")
> incorrectly changed onenand_block_markbad() to call mtd_block_markbad
> instead of onenand_chip's block_markbad function. As a result the
> function
> will now recurse and deadlock. Fix by reverting the change.
>
> Fixes: 5942ddbc500d ("mtd: introduce mtd_block_markbad interface")
> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
> ---
>
> v2: Don't ignore the return value.
>
> v1: http://lists.infradead.org/pipermail/linux-mtd/2016-Februar
> y/065582.html
>
> drivers/mtd/onenand/onenand_base.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/onenand/onenand_base.c
> b/drivers/mtd/onenand/onenand_base.c
> index 43b3392..652d018 100644
> --- a/drivers/mtd/onenand/onenand_base.c
> +++ b/drivers/mtd/onenand/onenand_base.c
> @@ -2599,6 +2599,7 @@ static int onenand_default_block_markbad(struct
> mtd_info *mtd, loff_t ofs)
> */
> static int onenand_block_markbad(struct mtd_info *mtd, loff_t ofs)
> {
> + struct onenand_chip *this = mtd->priv;
> int ret;
>
> ret = onenand_block_isbad(mtd, ofs);
> @@ -2610,7 +2611,7 @@ static int onenand_block_markbad(struct
> mtd_info *mtd, loff_t ofs)
> }
>
> onenand_get_device(mtd, FL_WRITING);
> - ret = mtd_block_markbad(mtd, ofs);
> + ret = this->block_markbad(mtd, ofs);
> onenand_release_device(mtd);
> return ret;
> }
--
Best Regards,
Artem Bityutskiy
next prev parent reply other threads:[~2016-02-24 12:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-20 20:27 [PATCH v2] mtd: onenand: fix deadlock in onenand_block_markbad Aaro Koskinen
2016-02-24 11:59 ` Artem Bityutskiy [this message]
2016-02-24 18:19 ` Brian Norris
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=1456315196.4719.4.camel@linux.intel.com \
--to=artem.bityutskiy@linux.intel.com \
--cc=aaro.koskinen@iki.fi \
--cc=dwmw2@infradead.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-mtd@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).