From: Kevin Smith <kevin.smith@elecsyscorp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mtd: pxa3xx_nand: Correct allocation and init bug
Date: Fri, 23 Oct 2015 20:57:47 +0000 [thread overview]
Message-ID: <562A9F4D.4050609@elecsyscorp.com> (raw)
In-Reply-To: <1445632454.701.214.camel@freescale.com>
On 10/23/2015 03:34 PM, Scott Wood wrote:
> Does Linux have this problem? Assuming no, please fix this by making the
> driver look more like Linux. At least then it would be the same ugliness.
There are 2 problems and one improvement:
1) Invalid dereference. This is U-Boot-only code not taken from Linux.
Removed.
2) Bad pointer math. This is different from Linux, and I have fixed it
by making it more like Linux.
3) Unnecessary memory allocation. I just noticed this while
investigating my crashes caused by the other two issues.
> Can you explain how the change in the calculation of "chip" and the
> allocation size is relevant to the NULL dereference? Couldn't that be fixed
> by just removing the "info->host[0]->mtd" line?
It's not, they are two separate bugs that crash when I try to load from
NAND. Perhaps I should submit a patch series for this?
- Kevin
next prev parent reply other threads:[~2015-10-23 20:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-23 17:49 [U-Boot] [PATCH] mtd: pxa3xx_nand: Correct allocation and init bug Kevin Smith
2015-10-23 18:20 ` Scott Wood
2015-10-23 19:56 ` Kevin Smith
2015-10-23 20:34 ` Scott Wood
2015-10-23 20:57 ` Kevin Smith [this message]
2015-10-23 21:14 ` Scott Wood
2015-10-23 21:18 ` Kevin Smith
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=562A9F4D.4050609@elecsyscorp.com \
--to=kevin.smith@elecsyscorp.com \
--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