All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Michael Riesch <michael.riesch@wolfvision.net>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 0/2] of: overlay: avoid potential null pointer exception
Date: Mon, 12 Sep 2022 11:16:08 +0200	[thread overview]
Message-ID: <20220912091608.GK24324@pengutronix.de> (raw)
In-Reply-To: <20220905100717.150557-1-michael.riesch@wolfvision.net>

On Mon, Sep 05, 2022 at 12:07:15PM +0200, Michael Riesch wrote:
> Hi all,
> 
> The function of_overlay_fix_path returns NULL in certain error cases but
> of_overlay_apply_symbols (which is the only caller) does not check the
> return value. For broken overlays this may result in a null pointer
> exception. Fix this by checking the return value and inform the user
> what exactly went wrong. To this end, improve the error handling in
> of_overlay_apply_tree.
> 
> The thread [0] gives a bit more context.
> 
> Best regards,
> Michael
> 
> [0] https://lore.barebox.org/barebox/95ff064f-aa11-c1ce-9d41-e38f2040c565@wolfvision.net/T/#u
> 
> Michael Riesch (2):
>   of: overlay: improve error handling in of_overlay_apply_tree
>   of: overlay: avoid potential null pointer exception

Applied, thanks

Sascha

> 
>  drivers/of/overlay.c | 18 +++++++++++++-----
>  1 file changed, 13 insertions(+), 5 deletions(-)
> 
> -- 
> 2.30.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      parent reply	other threads:[~2022-09-12  9:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-05 10:07 [PATCH 0/2] of: overlay: avoid potential null pointer exception Michael Riesch
2022-09-05 10:07 ` [PATCH 1/2] of: overlay: improve error handling in of_overlay_apply_tree Michael Riesch
2022-09-21  6:55   ` Michael Riesch
2022-09-21  7:57     ` Michael Tretter
2022-09-21 10:00       ` Michael Riesch
2022-09-05 10:07 ` [PATCH 2/2] of: overlay: avoid potential null pointer exception Michael Riesch
2022-09-12  9:16 ` 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=20220912091608.GK24324@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=michael.riesch@wolfvision.net \
    /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.