All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kyungmin Park" <kmpark@infradead.org>
To: "'Adrian Hunter'" <ext-adrian.hunter@nokia.com>,
	<linux-mtd@lists.infradead.org>
Subject: RE: [PATCH] [MTD] OneNAND: Do not allow oob write past end of page
Date: Mon, 5 Feb 2007 15:38:32 +0900	[thread overview]
Message-ID: <003a01c748f0$48530620$c7a3580a@swcenter.sec.samsung.co.kr> (raw)
In-Reply-To: <45C2EE39.7050909@nokia.com>

Hi Adrian

Umm Why is it required in OneNAND? Even though OneNAND is based on NAND. We
regard it as NOR
So we don't need this patch.

Thank you,
Kyungmin Park

> -----Original Message-----
> From: linux-mtd-bounces@lists.infradead.org 
> [mailto:linux-mtd-bounces@lists.infradead.org] On Behalf Of 
> Adrian Hunter
> Sent: Friday, February 02, 2007 4:55 PM
> To: linux-mtd@lists.infradead.org
> Subject: [PATCH] [MTD] OneNAND: Do not allow oob write past 
> end of page
> 
> >From ba01b89188f21ca9a982e33452217e5c6874fd0b Mon Sep 17 
> 00:00:00 2001
> From: Adrian Hunter <ext-adrian.hunter@nokia.com>
> Date: Thu, 1 Feb 2007 16:04:50 +0200
> Subject: [MTD] OneNAND: Do not allow oob write past end of page
> 
> OneNAND can write oob to successive pages, but NAND does not 
> do that.  For compatibility, disallow OneNAND from writing 
> past the end of the page.
> 
> Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
> ---
>  drivers/mtd/onenand/onenand_base.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mtd/onenand/onenand_base.c 
> b/drivers/mtd/onenand/onenand_base.c
> index 9ec28bb..b7da84a 100644
> --- a/drivers/mtd/onenand/onenand_base.c
> +++ b/drivers/mtd/onenand/onenand_base.c
> @@ -1191,6 +1191,13 @@ static int onenand_do_write_oob(struct m
>  		return -EINVAL;
>  	}
>  
> +	/* For compatibility with NAND: Do not allow write past 
> end of page */
> +	if (column + len > oobsize) {
> +		DEBUG(MTD_DEBUG_LEVEL0, "onenand_write_oob: "
> +		      "Attempt to write past end of page\n");
> +		return -EINVAL;
> +	}
> +
>  	/* Do not allow reads past end of device */
>  	if (unlikely(to >= mtd->size ||
>  		     column + len > ((mtd->size >> this->page_shift) -
> --
> 1.4.3
> 
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
> 
> 

  reply	other threads:[~2007-02-05  6:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-02  7:54 [PATCH] [MTD] OneNAND: Do not allow oob write past end of page Adrian Hunter
2007-02-05  6:38 ` Kyungmin Park [this message]
2007-02-05  7:22   ` Adrian Hunter
2007-02-05  7:44     ` Kyungmin Park
2007-02-05  8:30       ` Artem Bityutskiy
2007-02-06  2:15         ` Kyungmin Park
2007-02-08 14:11           ` Adrian Hunter
2007-02-09  0:20             ` Kyungmin Park

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='003a01c748f0$48530620$c7a3580a@swcenter.sec.samsung.co.kr' \
    --to=kmpark@infradead.org \
    --cc=ext-adrian.hunter@nokia.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 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.