Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1480339

Re: [GIT PULL] overlayfs fix for 4.8-rc5

From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [GIT PULL] overlayfs fix for 4.8-rc5
Date 2016-09-09 22:40 +0200
Message-ID <sfAKB-7F8-9@gated-at.bofh.it> (permalink)
References <sfzOy-71n-19@gated-at.bofh.it> <sfA7U-77R-23@gated-at.bofh.it> <sfAhA-7rj-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Sep 9, 2016 at 1:08 PM, Miklos Szeredi <miklos@szeredi.hu> wrote:
>
> That code tries to remove ACL from a directory, and there are several cases:
>
> 1) success: that's good obviously
> 2) error: no ACL was found: that's also good
> 3) error: ACL's are not supported by the filesystem: this is also good
> 4) error: ACL was there but we failed to remove it for some other
> reason: this is not good
>
> The patch adds handling of case 3.

I'm not convinced your explanation is correct.

The thing is, you added a test for -EOPNOTSUPP, and that is in fact at
least partly case (2) (eg xattr_resolve_name())

And EOPNOTSUPP actually seems to be the _clear_ case. The ENODATA case
is the one that is hard to actually verify. I tried to see that "yes,
all filesystems return ENODATA", but it wasn't obvious at all (p9fs?)
If I read the cifs code right, it returns EOPNOTSUPP for the "not
found" case too.

And ext2/ext4 returns ERANGE for some "we don't support that" cases,
while gfs2 seems to return EINVAL for those cases. Those are obviously
also cases of (2), but the fuse code doesn't test for it.

So the error list seems to be rather random, and no, ENODATA and
EOPNOTSUPP do not seem to be the only errors that would match the
above at all.

I dunno. I guess this is a corner case that really doesn't matter in
practice, but the whole "let's test a few special cases" approach
fails the smell test to me, and doesn't actually seem to match your
cases above very well.

              Linus

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[GIT PULL] overlayfs fix for 4.8-rc5 Miklos Szeredi <miklos@szeredi.hu> - 2016-09-09 21:40 +0200
  Re: [GIT PULL] overlayfs fix for 4.8-rc5 Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-09 22:00 +0200
    Re: [GIT PULL] overlayfs fix for 4.8-rc5 Miklos Szeredi <miklos@szeredi.hu> - 2016-09-09 22:10 +0200
      Re: [GIT PULL] overlayfs fix for 4.8-rc5 Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-09 22:40 +0200
        Re: [GIT PULL] overlayfs fix for 4.8-rc5 Miklos Szeredi <miklos@szeredi.hu> - 2016-09-09 23:20 +0200
          Re: [GIT PULL] overlayfs fix for 4.8-rc5 Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-09 23:50 +0200

csiph-web