linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] tmpfs: Fix simple_set_acl()
Date: Sun, 4 May 2014 08:42:54 -0400	[thread overview]
Message-ID: <20140504124254.GG21635@fieldses.org> (raw)
In-Reply-To: <20140422220815.3847.82405.stgit@klimt.1015granger.net>

This doesn't seem upstream--whose job is it to pick this up?

Maybe you could resend directly To: linus?

--b.

On Tue, Apr 22, 2014 at 06:08:51PM -0400, Chuck Lever wrote:
> Ben Greear <greearb@candelatech.com> reports that NFSD panics in
> posix_acl_equiv_mode() during an NFSv3 SETACL operation. I have
> reproduced this using an exported tmpfs and cthon04 with NFSv3.
> 
> A survey of .set_acl methods suggests that simple_set_acl() must
> tolerate a NULL "acl" argument.
> 
> Fixes: feda821e76f3bbbba4bd54d30b4d4005a7848aa5
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> 
>  fs/posix_acl.c |   12 +++++++-----
>  1 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/posix_acl.c b/fs/posix_acl.c
> index 9e363e4..0b25aae 100644
> --- a/fs/posix_acl.c
> +++ b/fs/posix_acl.c
> @@ -863,11 +863,13 @@ int simple_set_acl(struct inode *inode, struct posix_acl *acl, int type)
>  	int error;
>  
>  	if (type == ACL_TYPE_ACCESS) {
> -		error = posix_acl_equiv_mode(acl, &inode->i_mode);
> -		if (error < 0)
> -			return 0;
> -		if (error == 0)
> -			acl = NULL;
> +		if (acl) {
> +			error = posix_acl_equiv_mode(acl, &inode->i_mode);
> +			if (error < 0)
> +				return 0;
> +			if (error == 0)
> +				acl = NULL;
> +		}
>  	}
>  
>  	inode->i_ctime = CURRENT_TIME;
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-05-04 12:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22 22:08 [PATCH] tmpfs: Fix simple_set_acl() Chuck Lever
2014-05-04 12:42 ` J. Bruce Fields [this message]
2014-05-04 19:08   ` Chuck Lever
2014-05-05 14:29     ` J.;Bruce Fields

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=20140504124254.GG21635@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --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).