mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-16 22:39:48 +00:00
btrfs: ensure that file descriptor used with subvol ioctls is a dir
commit325c50e3ceupstream. If the subvol/snapshot create/destroy ioctls are passed a regular file with execute permissions set, we'll eventually Oops while trying to do inode->i_op->lookup via lookup_one_len. This patch ensures that the file descriptor refers to a directory. Fixes:cb8e70901d(Btrfs: Fix subvolume creation locking rules) Fixes:76dda93c6a(Btrfs: add snapshot/subvolume destroy ioctl) Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Chris Mason <clm@fb.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
parent
77d74c0a67
commit
d1adfc596b
1 changed files with 12 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue