tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
new-kill-btree-inode
head:   f2213041f761c4972696a8dabfad3c8bac9ffde2
commit: f2213041f761c4972696a8dabfad3c8bac9ffde2 [22/22] btrfs: fix send ioctl 
on 32bit with 64bit kernel
config: x86_64-randconfig-x018-201739 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout f2213041f761c4972696a8dabfad3c8bac9ffde2
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   fs//btrfs/send.c: In function 'btrfs_ioctl_send':
   fs//btrfs/send.c:6425:24: error: implicit declaration of function 
'compat_ptr' [-Werror=implicit-function-declaration]
      arg->clone_sources = compat_ptr(args32.clone_sources);
                           ^~~~~~~~~~
>> fs//btrfs/send.c:6425:22: warning: assignment makes pointer from integer 
>> without a cast [-Wint-conversion]
      arg->clone_sources = compat_ptr(args32.clone_sources);
                         ^
   cc1: some warnings being treated as errors

vim +6425 fs//btrfs/send.c

  6368  
  6369  long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_, bool 
compat)
  6370  {
  6371          int ret = 0;
  6372          struct btrfs_root *send_root = 
BTRFS_I(file_inode(mnt_file))->root;
  6373          struct btrfs_fs_info *fs_info = send_root->fs_info;
  6374          struct btrfs_root *clone_root;
  6375          struct btrfs_ioctl_send_args *arg = NULL;
  6376          struct btrfs_key key;
  6377          struct send_ctx *sctx = NULL;
  6378          u32 i;
  6379          u64 *clone_sources_tmp = NULL;
  6380          int clone_sources_to_rollback = 0;
  6381          unsigned alloc_size;
  6382          int sort_clone_roots = 0;
  6383          int index;
  6384  
  6385          if (!capable(CAP_SYS_ADMIN))
  6386                  return -EPERM;
  6387  
  6388          /*
  6389           * The subvolume must remain read-only during send, protect 
against
  6390           * making it RW. This also protects against deletion.
  6391           */
  6392          spin_lock(&send_root->root_item_lock);
  6393          send_root->send_in_progress++;
  6394          spin_unlock(&send_root->root_item_lock);
  6395  
  6396          /*
  6397           * This is done when we lookup the root, it should already be 
complete
  6398           * by the time we get here.
  6399           */
  6400          WARN_ON(send_root->orphan_cleanup_state != ORPHAN_CLEANUP_DONE);
  6401  
  6402          /*
  6403           * Userspace tools do the checks and warn the user if it's
  6404           * not RO.
  6405           */
  6406          if (!btrfs_root_readonly(send_root)) {
  6407                  ret = -EPERM;
  6408                  goto out;
  6409          }
  6410  
  6411          if (compat) {
  6412                  struct btrfs_ioctl_send_args_32 args32;
  6413                  ret = copy_from_user(&args32, arg_, sizeof(args32));
  6414                  if (ret) {
  6415                          btrfs_err(fs_info, "args32 copy failed\n");
  6416                          goto out;
  6417                  }
  6418                  arg = kzalloc(sizeof(*arg), GFP_KERNEL);
  6419                  if (!arg) {
  6420                          ret = -ENOMEM;
  6421                          goto out;
  6422                  }
  6423                  arg->send_fd = args32.send_fd;
  6424                  arg->clone_sources_count = args32.clone_sources_count;
> 6425                  arg->clone_sources = compat_ptr(args32.clone_sources);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to