From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] cfi_flash: fix bug with flash banks with different sector numbers
Date: Mon, 28 Mar 2011 17:55:03 +0200 [thread overview]
Message-ID: <m2pqpbp7e0.fsf@ohwell.denx.de> (raw)
In-Reply-To: <1300727276-10204-1-git-send-email-martin.krause@tqs.de> (Martin Krause's message of "Mon, 21 Mar 2011 18:07:56 +0100")
Hello Stefan,
> The function find_sector() does not take into account if the flash bank
> has changed since the last call. This could lead to illegal accesses inside
> and beyond the flash_info_t info strcture. For example if the current
> flash bank has less sectors than the last used flash bank.
>
> This patch adds two cheks. One that insures, that the current sector does
> not exceed the allowed maximum (which is always a good idea). And one that
> checks if the current access is to the same flash bank as the last access.
> If not, the search loop will start with sector 0.
>
> Signed-off-by: Martin Krause <martin.krause@tqs.de>
Can you please comment on Martins fix? Thanks!
Detlev
--
There are three kinds of people in the world; those who can count and
those who can't.
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
next prev parent reply other threads:[~2011-03-28 15:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-21 17:07 [U-Boot] [PATCH] cfi_flash: fix bug with flash banks with different sector numbers Martin Krause
2011-03-28 15:53 ` Detlev Zundel
2011-03-28 15:55 ` Detlev Zundel [this message]
2011-03-28 16:00 ` Stefan Roese
2011-03-28 16:11 ` Detlev Zundel
2011-03-28 17:04 ` Stefan Roese
2011-03-28 17:32 ` Stefan Roese
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=m2pqpbp7e0.fsf@ohwell.denx.de \
--to=dzu@denx.de \
--cc=u-boot@lists.denx.de \
/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