mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Gaël PORTAY" <gael.portay@savoirfairelinux.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] fs: check pointer returned by get_fsdevice_by_path before dereferencing
Date: Mon, 19 Mar 2018 05:06:17 -0400	[thread overview]
Message-ID: <20180319090616.vmmb2dky3syrmuwm@archlinux.local> (raw)
In-Reply-To: <20180319083629.kxjdc4jnd35prif2@pengutronix.de>

Hi Sascha,

On Mon, Mar 19, 2018 at 09:36:29AM +0100, Sascha Hauer wrote:
> ...
> I wonder though what calls into the filesystem layer before / is
> mounted in your case.
>

The issue is trigger by function stat() in start_barebox(), right before
I expect to have a shell.

Here.

	if (IS_ENABLED(CONFIG_COMMAND_SUPPORT)) {
		pr_info("running /env/bin/init...\n");

		if (!stat("/env/bin/init", &s))
			run_command("source /env/bin/init");
		else
			pr_err("/env/bin/init not found\n");
	}

My configuration is very minimal for now. I do not have (yet) any FS
selected (excepted devfs) and I do not have any root device mounted
either in this configuration.

I guess this is why fs_dev_root is NULL and why get_fsdevice_by_path()
returns fs_dev_root (because there is nothing to iterate in list
fs_device_list).

Gael

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

  reply	other threads:[~2018-03-19  9:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-18 22:22 Gaël PORTAY
2018-03-19  8:36 ` Sascha Hauer
2018-03-19  9:06   ` Gaël PORTAY [this message]
2018-03-27  7:17 ` Antony Pavlov

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=20180319090616.vmmb2dky3syrmuwm@archlinux.local \
    --to=gael.portay@savoirfairelinux.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@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