* btrfs: issues with SUBVOL_SETFLAGS
@ 2011-02-09 19:14 Dan Rosenberg
2011-02-10 1:34 ` Li Zefan
0 siblings, 1 reply; 2+ messages in thread
From: Dan Rosenberg @ 2011-02-09 19:14 UTC (permalink / raw)
To: lizf, chris.mason; +Cc: linux-btrfs
Commit 0caa102da82799efaba88e234484786a9591c797 introduced the
SUBVOL_SETFLAGS ioctl, which contains the following check:
if (flags & ~BTRFS_SUBVOL_CREATE_ASYNC)
return -EINVAL;
if (flags & ~BTRFS_SUBVOL_RDONLY)
return -EOPNOTSUPP;
Is it intentional that 0 is the only acceptable flags value? In
addition, there should probably be an inode ownership check before
allowing setting subvolume flags.
Regards,
Dan
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: btrfs: issues with SUBVOL_SETFLAGS
2011-02-09 19:14 btrfs: issues with SUBVOL_SETFLAGS Dan Rosenberg
@ 2011-02-10 1:34 ` Li Zefan
0 siblings, 0 replies; 2+ messages in thread
From: Li Zefan @ 2011-02-10 1:34 UTC (permalink / raw)
To: Dan Rosenberg; +Cc: chris.mason, linux-btrfs
Dan Rosenberg wrote:
> Commit 0caa102da82799efaba88e234484786a9591c797 introduced the
> SUBVOL_SETFLAGS ioctl, which contains the following check:
>
> if (flags & ~BTRFS_SUBVOL_CREATE_ASYNC)
Oops, should be:
if (flags & BTRFS_SUBVOL_CREATE_ASYNC)
> return -EINVAL;
>
> if (flags & ~BTRFS_SUBVOL_RDONLY)
> return -EOPNOTSUPP;
>
> Is it intentional that 0 is the only acceptable flags value? In
> addition, there should probably be an inode ownership check before
> allowing setting subvolume flags.
>
Thanks for pointing it out! Fix will be sent out soon.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-10 1:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-09 19:14 btrfs: issues with SUBVOL_SETFLAGS Dan Rosenberg
2011-02-10 1:34 ` Li Zefan
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.