Linux-Fsdevel Archive on lore.kernel.org
 help / color / Atom feed
From: Abel Vesa <abel.vesa@nxp.com>
To: David Howells <dhowells@redhat.com>
Cc: "viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	dl-linux-imx <linux-imx@nxp.com>
Subject: PROBLEM: fs: hugetlbfs: boot failure due to specs sentinel missing on linux-next
Date: Mon, 4 Feb 2019 13:54:04 +0000
Message-ID: <20190204135403.ttitgfy22cp7h2lh@fsr-ub1664-175> (raw)

Hi David,

I found this this morning trying to boot up i.MX8MQ platform.
It's totally unrelated though.

Your commit:
2284cf59cbcec "hugetlbfs: Convert to fs_context"
doesn't put a sentinel at the end of hugetlb_param_specs.

Then, the your commit:
f512b838c1048 "vfs: Add configuration parser helpers"
adds the fs_validate_description where you check for sentinel
but since the hugetlb_param_specs doesn't have it it freezes
inside the following printf:

+                       /* Check that the type is in range */
+                       if (t == __fs_param_wasnt_defined ||
+                           t >= nr__fs_parameter_type) {
+                               pr_err("VALIDATE %s: PARAM[%s] Bad type %u\n",
+                                      name, param->name, t);
+                               good = false;
+                       } else if (t == fs_param_is_enum) {
+                               enums = true;
+                       }

IMHO, what happens here is the missing sentinel allows your checking
here to go out of bounds and then the param->name is whatever garbage
happens to be at the end of that array and that makes the printf to
freeze.

This isn't something I looked at really close, so I might be wrong.

I wasn't able to find the mail with the patch to reply to that
so I had to write this as a separate mail.

             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04 13:54 Abel Vesa [this message]
2019-02-04 14:04 ` David Howells

Reply instructions:

You may reply publically 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=20190204135403.ttitgfy22cp7h2lh@fsr-ub1664-175 \
    --to=abel.vesa@nxp.com \
    --cc=dhowells@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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

Linux-Fsdevel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-fsdevel/0 linux-fsdevel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-fsdevel linux-fsdevel/ https://lore.kernel.org/linux-fsdevel \
		linux-fsdevel@vger.kernel.org linux-fsdevel@archiver.kernel.org
	public-inbox-index linux-fsdevel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-fsdevel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox