linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laura Abbott <labbott@redhat.com>
To: Al Viro <viro@zeniv.linux.org.uk>, Hugh Dickins <hughd@google.com>
Cc: David Howells <dhowells@redhat.com>,
	Linux-MM <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-fsdevel@vger.kernel.org
Subject: Re: mount on tmpfs failing to parse context option
Date: Tue, 8 Oct 2019 12:33:15 -0400	[thread overview]
Message-ID: <9349bbbe-31fe-2b0a-001d-2e22ee20c12f@redhat.com> (raw)
In-Reply-To: <20191008012622.GP26530@ZenIV.linux.org.uk>

On 10/7/19 9:26 PM, Al Viro wrote:
> On Mon, Oct 07, 2019 at 05:50:31PM -0700, Hugh Dickins wrote:
> 
> [sorry for being MIA - had been sick through the last week, just digging
> myself from under piles of mail; my apologies]
> 
>> (tmpfs, very tiresomely, supports a NUMA "mpol" mount option which can
>> have commas in it e.g "mpol=bind:0,2": which makes all its comma parsing
>> awkward.  I assume that where the new mount API commits bend over to
>> accommodate that peculiarity, they end up mishandling the comma in
>> the context string above.)
> 
> 	Dumber than that, I'm afraid.  mpol is the reason for having
> ->parse_monolithic() in the first place, all right, but the problem is
> simply the lack of security_sb_eat_lsm_opts() call in it.
> 
> 	Could you check if the following fixes that one?
> 
> diff --git a/mm/shmem.c b/mm/shmem.c
> index 0f7fd4a85db6..8dcc8d04cbaf 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -3482,6 +3482,12 @@ static int shmem_parse_options(struct fs_context *fc, void *data)
>   {
>   	char *options = data;
>   
> +	if (options) {
> +		int err = security_sb_eat_lsm_opts(options, &fc->security);
> +		if (err)
> +			return err;
> +	}
> +
>   	while (options != NULL) {
>   		char *this_char = options;
>   		for (;;) {
> 

Yes the reporter says that works.

Thanks,
Laura

  reply	other threads:[~2019-10-08 16:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-30 16:07 mount on tmpfs failing to parse context option Laura Abbott
2019-10-07 14:45 ` Laura Abbott
2019-10-08  0:50   ` Hugh Dickins
2019-10-08  1:26     ` Al Viro
2019-10-08 16:33       ` Laura Abbott [this message]
2019-10-08 12:38     ` Ian Kent
2019-10-08 12:52       ` Ian Kent
2019-10-08 12:56       ` Karel Zak
2019-10-08 19:51         ` Hugh Dickins

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=9349bbbe-31fe-2b0a-001d-2e22ee20c12f@redhat.com \
    --to=labbott@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=hughd@google.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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
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;
as well as URLs for NNTP newsgroup(s).