linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Andrei Vagin <avagin@openvz.org>
Cc: dhowells@redhat.com, linux-fsdevel@vger.kernel.org,
	Andrei Vagin <avagin@gmail.com>
Subject: Re: [PATCH dhowells/mount-api] fs: fix checking an error code of security_fs_context_parse_param
Date: Thu, 06 Sep 2018 11:16:24 +0100	[thread overview]
Message-ID: <18703.1536228984@warthog.procyon.org.uk> (raw)
In-Reply-To: <20180906001051.24015-1-avagin@openvz.org>

Andrei Vagin <avagin@openvz.org> wrote:

> security_fs_context_parse_param() returns 0 if everything is okay.

Not quite.  It returns 0 to indicate that it processed the argument and that
the argument doesn't belong to the filesystem.  It returns -ENOPARAM to
indicate that the argument should be passed along to the filesystem.  Any
other error is an actual error.

>  	ret = security_fs_context_parse_param(fc, param);
> -	if (ret != -ENOPARAM)
> +	if (ret)

So this change is wrong.

The change that needs making is to the documentation - in particular
lsm_hooks.h.

David

  reply	other threads:[~2018-09-06 14:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06  0:10 [PATCH dhowells/mount-api] fs: fix checking an error code of security_fs_context_parse_param Andrei Vagin
2018-09-06 10:16 ` David Howells [this message]
2018-09-06 18:44   ` [PATCH dhowells/mount-api] fs: return -ENOPARAM from security_fs_context_parse_param by default Andrei Vagin
2018-09-06 23:08   ` [PATCH dhowells/mount-api] fs: fix checking an error code of security_fs_context_parse_param Andrei Vagin
2018-09-11 20:15   ` [PATCH dhowells/mount-api] fs: return -ENOPARAM from security_fs_context_parse_param by default David Howells
2018-09-06 10:18 ` [PATCH dhowells/mount-api] fs: fix checking an error code of security_fs_context_parse_param David Howells
2018-09-11  5:12   ` Andrei Vagin
2018-09-11 20:13   ` David Howells

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=18703.1536228984@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=avagin@gmail.com \
    --cc=avagin@openvz.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /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).