[linux-next:master 13878/13946] fs/namespace.c:3031:55: error: expected ')' before ';' token

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   d47175169c28eedd2cc2ab8c01f38764cb0269cc
commit: c1e6784607ec548d505ff2dab0312141a20d04ed [13878/13946] fs/namespace: untag user pointers in copy_mount_options
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout c1e6784607ec548d505ff2dab0312141a20d04ed
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=sparc64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All error/warnings (new ones prefixed by >>):

   fs/namespace.c: In function 'copy_mount_options':
>> fs/namespace.c:3031:55: error: expected ')' before ';' token
     size = TASK_SIZE - (unsigned long)untagged_addr(data);
                                                          ^
>> fs/namespace.c:3043:1: error: expected ';' before '}' token
    }
    ^
   fs/namespace.c:3015:6: warning: unused variable 'i' [-Wunused-variable]
     int i;
         ^
>> fs/namespace.c:3043:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
   At top level:
   fs/namespace.c:2991:13: warning: 'exact_copy_from_user' defined but not used [-Wunused-function]
    static long exact_copy_from_user(void *to, const void __user * from,
                ^~~~~~~~~~~~~~~~~~~~

vim +3031 fs/namespace.c

  3012	
  3013	void *copy_mount_options(const void __user * data)
  3014	{
  3015		int i;
  3016		unsigned long size;
  3017		char *copy;
  3018	
  3019		if (!data)
  3020			return NULL;
  3021	
  3022		copy = kmalloc(PAGE_SIZE, GFP_KERNEL);
  3023		if (!copy)
  3024			return ERR_PTR(-ENOMEM);
  3025	
  3026		/* We only care that *some* data at the address the user
  3027		 * gave us is valid.  Just in case, we'll zero
  3028		 * the remainder of the page.
  3029		 */
  3030		/* copy_from_user cannot cross TASK_SIZE ! */
> 3031		size = TASK_SIZE - (unsigned long)untagged_addr(data);
  3032		if (size > PAGE_SIZE)
  3033			size = PAGE_SIZE;
  3034	
  3035		i = size - exact_copy_from_user(copy, data, size);
  3036		if (!i) {
  3037			kfree(copy);
  3038			return ERR_PTR(-EFAULT);
  3039		}
  3040		if (i != PAGE_SIZE)
  3041			memset(copy + i, 0, PAGE_SIZE - i);
  3042		return copy;
> 3043	}
  3044	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux