mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Roland Hieber <rhi@pengutronix.de>
Cc: Barebox Mailing List <barebox@lists.infradead.org>
Subject: Re: [PATCH v2] ubi: prevent null pointer reference
Date: Tue, 22 Jan 2019 08:12:24 +0100	[thread overview]
Message-ID: <20190122071224.wcyole4xkshgic3r@pengutronix.de> (raw)
In-Reply-To: <20190121165616.19170-1-rhi@pengutronix.de>

On Mon, Jan 21, 2019 at 05:56:16PM +0100, Roland Hieber wrote:
> After flashing a bogus UBI image, e.g. when the UBI is bigger than the
> available flash size, it can happen that barebox hangs itself with a
> stacktrace when the board code or the environment does a ubi_attach() on
> boot:
> 
>     ERROR: ubi0 error: init_volumes: not enough PEBs, required 7478, available 4024
>     unable to handle NULL pointer dereference at address 0x00000204
>     pc : [<1fd1eaf2>]    lr : [<1fd15aad>]
>     sp : 1feefd30  ip : 0000000a  fp : 1fd5d1d7
>     r10: 00001d34  r9 : 00000000  r8 : 1fd5d540
>     r7 : 14983148  r6 : 00000006  r5 : ffffffe4  r4 : 14983004
>     r3 : 1fd82bfc  r2 : 021f0000  r1 : 0000000a  r0 : 00000000
>     Flags: nzcv  IRQs off  FIQs off  Mode SVC_32
>     [<1fd1eaf2>] (ubi_fastmap_destroy_checkmap+0x8/0xa) from [<1fd15aad>] (ubi_read_volume_table+0x4d9/0x71c)
>     [<1fd15aad>] (ubi_read_volume_table+0x4d9/0x71c) from [<1fd1cbf7>] (ubi_attach+0x157/0x1f8)
>     [<1fd1cbf7>] (ubi_attach+0x157/0x1f8) from [<1fd16ec3>] (ubi_attach_mtd_dev+0x4a3/0x954)
>     [...]

I just had a look at the kernel and it seems to have the same problem.

Anyway, applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2019-01-22  7:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-21 16:29 [PATCH] " Roland Hieber
2019-01-21 16:55 ` Roland Hieber
2019-01-21 16:56 ` [PATCH v2] " Roland Hieber
2019-01-22  7:12   ` Sascha Hauer [this message]

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=20190122071224.wcyole4xkshgic3r@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=rhi@pengutronix.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