Re: [PATCH] tmpfs: Fix simple_set_acl()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bruce-

On May 4, 2014, at 8:42 AM, J. Bruce Fields <bfields@xxxxxxxxxxxx> wrote:

> This doesn't seem upstream--whose job is it to pick this up?
> 
> Maybe you could resend directly To: linus?

Thanks for following up.

There was some discussion about it this week because the same issue
arose for jfs as well.

Christoph has a broader solution: simply check for acl == NULL in
posix_acl_equiv_mode(). The plan is then to remove that check from
filesystem-specific .set_acl methods.

He posted a patch this morning, so I'm going to let him run this
to ground.

> --b.
> 
> On Tue, Apr 22, 2014 at 06:08:51PM -0400, Chuck Lever wrote:
>> Ben Greear <greearb@xxxxxxxxxxxxxxx> 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@xxxxxxxxxx>
>> ---
>> 
>> 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@xxxxxxxxxxxxxxx
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Chuck Lever
chuck[dot]lever[at]oracle[dot]com




--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux