Re: [PATCH] btrfs: Fix -EOVERFLOW handling in btrfs_ioctl_tree_search_v2

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

 



On Fri, Aug 04, 2017 at 02:41:18PM +0300, Nikolay Borisov wrote:
> The buffer passed to btrfs_ioctl_tree_search* functions have to be at least
> sizeof(struct btrfs_ioctl_search_header). If this is not the case then the
> ioctl should return -EOVERFLOW and set the uarg->buf_size to the minimum
> required size. Currently btrfs_ioctl_tree_search_v2 would return an -EOVERFLOW
> error with ->buf_size being set to the value passed by user space. Fix this by
> removing the size check and relying on search_ioctl, which already includes it
> and correctly sets buf_size.
> 
> Signed-off-by: Nikolay Borisov <nborisov@xxxxxxxx>

Reviewed-by: David Sterba <dsterba@xxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux