* ocfs2: xattr problems with 5.4.0-rc7
@ 2019-11-12 14:45 Thomas Voegtle
2019-11-13 1:28 ` Joseph Qi
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Voegtle @ 2019-11-12 14:45 UTC (permalink / raw
To: Jia-Ju Bai, Joseph Qi, Mark Fasheh, Joel Becker; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1204 bytes --]
Hello,
with 5.4.0-rc7 and 4.9.200 we see the following errors with
mkdir or touch on a ocfs2 mountpoint:
root@s2:/shared/ClusterShareDisk# mkdir dir
mkdir: cannot create directory ‘dir’: Invalid argument
which produces this output:
root@s2:/shared/ClusterShareDisk# dmesg
[ 6918.815770] (mkdir,19461,0):ocfs2_xa_set:2242 ERROR: status = -22
[ 6918.815772] (mkdir,19461,0):ocfs2_mknod:408 ERROR: status = -22
[ 6918.816215] (mkdir,19461,0):ocfs2_mknod:486 ERROR: status = -22
[ 6918.816216] (mkdir,19461,0):ocfs2_mkdir:652 ERROR: status = -22
We got some ACLs:
$ getfacl /shared/ClusterShareDisk/
getfacl: Removing leading '/' from absolute path names
# file: shared/ClusterShareDisk/
# owner: root
# group: root
user::rwx
user:admin:rwx
group::rwx
mask::rwx
other::---
default:user::rwx
default:user:admin:rwx
default:group::rwx
default:mask::rwx
default:other::---
And of course it is mounted with user_xattr and acl option.
Reverting
commit 56e94ea132bb5c2c1d0b60a6aeb34dcb7d71a53d
Author: Jia-Ju Bai <baijiaju1990@gmail.com>
Date: Sun Oct 6 17:57:50 2019 -0700
fs: ocfs2: fix possible null-pointer dereferences in
ocfs2_xa_prepare_entry()
fixes the problem.
Greetings,
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ocfs2: xattr problems with 5.4.0-rc7
2019-11-12 14:45 ocfs2: xattr problems with 5.4.0-rc7 Thomas Voegtle
@ 2019-11-13 1:28 ` Joseph Qi
2019-11-13 5:01 ` Joseph Qi
0 siblings, 1 reply; 3+ messages in thread
From: Joseph Qi @ 2019-11-13 1:28 UTC (permalink / raw
To: Thomas Voegtle, Jia-Ju Bai, Mark Fasheh, Joel Becker; +Cc: linux-kernel
Hi Thomas,
Thanks for reporting this issue.
I have some doubts on it, please see my comments below.
On 19/11/12 22:45, Thomas Voegtle wrote:
>
> Hello,
>
> with 5.4.0-rc7 and 4.9.200 we see the following errors with mkdir or touch on a ocfs2 mountpoint:
>
> root@s2:/shared/ClusterShareDisk# mkdir dir
> mkdir: cannot create directory ‘dir’: Invalid argument
>
> which produces this output:
>
> root@s2:/shared/ClusterShareDisk# dmesg
> [ 6918.815770] (mkdir,19461,0):ocfs2_xa_set:2242 ERROR: status = -22
> [ 6918.815772] (mkdir,19461,0):ocfs2_mknod:408 ERROR: status = -22
> [ 6918.816215] (mkdir,19461,0):ocfs2_mknod:486 ERROR: status = -22
> [ 6918.816216] (mkdir,19461,0):ocfs2_mkdir:652 ERROR: status = -22
>
ocfs2_xa_set
ocfs2_xa_prepare_entry
Since ocfs2_xa_set() returns -EINVAL, it means loc->xl_entry is NULL.
if (!loc->xl_entry) {
rc = -EINVAL;
goto out;
}
After reverting
commit 56e94ea132bb "fs: ocfs2: fix possible null-pointer dereferences in ocfs2_xa_prepare_entry()",
it will call ocfs2_xa_add_entry(),
if (loc->xl_entry) {
...
} else
ocfs2_xa_add_entry(loc, name_hash);
Theoretically it will cause NULL pointer dereference when access attributes of loc->xl_entry.
So could you please check if the issue is caused by NULL loc->xl_entry?
Thanks,
Joseph
> We got some ACLs:
> $ getfacl /shared/ClusterShareDisk/
> getfacl: Removing leading '/' from absolute path names
> # file: shared/ClusterShareDisk/
> # owner: root
> # group: root
> user::rwx
> user:admin:rwx
> group::rwx
> mask::rwx
> other::---
> default:user::rwx
> default:user:admin:rwx
> default:group::rwx
> default:mask::rwx
> default:other::---
>
> And of course it is mounted with user_xattr and acl option.
>
> Reverting
> commit 56e94ea132bb5c2c1d0b60a6aeb34dcb7d71a53d
> Author: Jia-Ju Bai <baijiaju1990@gmail.com>
> Date: Sun Oct 6 17:57:50 2019 -0700
>
> fs: ocfs2: fix possible null-pointer dereferences in
> ocfs2_xa_prepare_entry()
>
> fixes the problem.
>
> Greetings,
>
>
> Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ocfs2: xattr problems with 5.4.0-rc7
2019-11-13 1:28 ` Joseph Qi
@ 2019-11-13 5:01 ` Joseph Qi
0 siblings, 0 replies; 3+ messages in thread
From: Joseph Qi @ 2019-11-13 5:01 UTC (permalink / raw
To: Thomas Voegtle, Jia-Ju Bai, Mark Fasheh, Joel Becker; +Cc: linux-kernel
On 19/11/13 09:28, Joseph Qi wrote:
> Hi Thomas,
> Thanks for reporting this issue.
> I have some doubts on it, please see my comments below.
>
> On 19/11/12 22:45, Thomas Voegtle wrote:
>>
>> Hello,
>>
>> with 5.4.0-rc7 and 4.9.200 we see the following errors with mkdir or touch on a ocfs2 mountpoint:
>>
>> root@s2:/shared/ClusterShareDisk# mkdir dir
>> mkdir: cannot create directory ‘dir’: Invalid argument
>>
>> which produces this output:
>>
>> root@s2:/shared/ClusterShareDisk# dmesg
>> [ 6918.815770] (mkdir,19461,0):ocfs2_xa_set:2242 ERROR: status = -22
>> [ 6918.815772] (mkdir,19461,0):ocfs2_mknod:408 ERROR: status = -22
>> [ 6918.816215] (mkdir,19461,0):ocfs2_mknod:486 ERROR: status = -22
>> [ 6918.816216] (mkdir,19461,0):ocfs2_mkdir:652 ERROR: status = -22
>>
> ocfs2_xa_set
> ocfs2_xa_prepare_entry
>
> Since ocfs2_xa_set() returns -EINVAL, it means loc->xl_entry is NULL.
>
> if (!loc->xl_entry) {
> rc = -EINVAL;
> goto out;
> }
>
> After reverting
> commit 56e94ea132bb "fs: ocfs2: fix possible null-pointer dereferences in ocfs2_xa_prepare_entry()",
> it will call ocfs2_xa_add_entry(),
>
> if (loc->xl_entry) {
> ...
> } else
> ocfs2_xa_add_entry(loc, name_hash);
>
> Theoretically it will cause NULL pointer dereference when access attributes of loc->xl_entry.
> So could you please check if the issue is caused by NULL loc->xl_entry?
>
I think I've got the answer. loc->xl_ops->xlo_add_entry() will handle this case.
I'll revert this patch.
Thanks,
Joseph
>
>> We got some ACLs:
>> $ getfacl /shared/ClusterShareDisk/
>> getfacl: Removing leading '/' from absolute path names
>> # file: shared/ClusterShareDisk/
>> # owner: root
>> # group: root
>> user::rwx
>> user:admin:rwx
>> group::rwx
>> mask::rwx
>> other::---
>> default:user::rwx
>> default:user:admin:rwx
>> default:group::rwx
>> default:mask::rwx
>> default:other::---
>>
>> And of course it is mounted with user_xattr and acl option.
>>
>> Reverting
>> commit 56e94ea132bb5c2c1d0b60a6aeb34dcb7d71a53d
>> Author: Jia-Ju Bai <baijiaju1990@gmail.com>
>> Date: Sun Oct 6 17:57:50 2019 -0700
>>
>> fs: ocfs2: fix possible null-pointer dereferences in
>> ocfs2_xa_prepare_entry()
>>
>> fixes the problem.
>>
>> Greetings,
>>
>>
>> Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-13 5:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-12 14:45 ocfs2: xattr problems with 5.4.0-rc7 Thomas Voegtle
2019-11-13 1:28 ` Joseph Qi
2019-11-13 5:01 ` Joseph Qi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.