public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@snapgear.com>
To: Daniel Rosenthal <danielrosenthal@acm.org>
Cc: linux-mtd@lists.infradead.org, dwmw2@infradead.org
Subject: Re: [PATCH (fixed)] Fix infinite loop in INFTL_foldchain() in	drivers/mtd/inftlcore.c
Date: Wed, 08 Oct 2008 16:25:03 +1000	[thread overview]
Message-ID: <48EC523F.8030305@snapgear.com> (raw)
In-Reply-To: <20081007132904.6vvmlioy8co004ko@system.cs.fsu.edu>

Hi Daniel,

Daniel Rosenthal wrote:
> I'm having problems with my email client, but I've attached a patch 
> (both inline and as a regular attachment). This patch fixes a loop that 
> is potentially infinite in INFTL_foldchain in drivers/mtd/inftlcore.c.
> 
> When iterating over a chain in reverse (oldest block first), this patch 
> correctly marks the PUtable[] entry of the second to last erase block of 
> a chain as BLOCK_NIL, regardless of whether or not it can format the 
> last block successfully. Before, the second to last block was only 
> marked as pointing to BLOCK_NIL if INFTL_formatblock() succeeded on the 
> last block of the chain, which could potentially result in an infinite 
> loop if the block was worn out and refused to format.
> 
> If there are any problems with this patch please let me know. I can 
> apply them fine after pulling them from email, but my email client (web 
> interface) isn't fullproof, so if anybody else has problems, please let 
> me know. (I can't send it through pine or otherwise due to network 
> configuration.)

I haven't looked at this code for quite a while, but your
reasoning and patch looks right to me. So you have my acked-by.

Acked-by: Greg Ungerer <gerg@snapgear.com>

David, I assume you are going to pick this up?

Regards
Greg



------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg@snapgear.com
Secure Computing Corporation                PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com

  reply	other threads:[~2008-10-08  6:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-07 17:29 [PATCH (fixed)] Fix infinite loop in INFTL_foldchain() in drivers/mtd/inftlcore.c Daniel Rosenthal
2008-10-08  6:25 ` Greg Ungerer [this message]
2008-10-08 10:39   ` David Woodhouse

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=48EC523F.8030305@snapgear.com \
    --to=gerg@snapgear.com \
    --cc=danielrosenthal@acm.org \
    --cc=dwmw2@infradead.org \
    --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