[next:master 6416/6487] fs/exec.c:1507:53: sparse: incorrect type in argument 2 (different address spaces)

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

 



tree:   git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   bbdef57970d5e1887de755474ff1562baa17ef11
commit: ed9af7d027e2f211e782631dcd6740323a6f26f9 [6416/6487] syscalls,x86: implement execveat() system call
reproduce:
  # apt-get install sparse
  git checkout ed9af7d027e2f211e782631dcd6740323a6f26f9
  make ARCH=x86_64 allmodconfig
  make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   fs/exec.c:407:39: sparse: incorrect type in return expression (different address spaces)
   fs/exec.c:407:39:    expected char const [noderef] <asn:1>*
   fs/exec.c:407:39:    got void *
   fs/exec.c:414:31: sparse: incorrect type in return expression (different address spaces)
   fs/exec.c:414:31:    expected char const [noderef] <asn:1>*
   fs/exec.c:414:31:    got void *
   fs/exec.c:986:56: sparse: incorrect type in argument 2 (different address spaces)
   fs/exec.c:986:56:    expected struct task_struct *parent
   fs/exec.c:986:56:    got struct task_struct [noderef] <asn:4>*parent
   fs/exec.c:1019:17: sparse: incorrect type in assignment (different address spaces)
   fs/exec.c:1019:17:    expected struct sighand_struct *volatile <noident>
   fs/exec.c:1019:17:    got struct sighand_struct [noderef] <asn:4>*<noident>
   fs/exec.c:1421:70: sparse: incorrect type in argument 1 (different address spaces)
   fs/exec.c:1421:70:    expected struct task_struct *tsk
   fs/exec.c:1421:70:    got struct task_struct [noderef] <asn:4>*parent
>> fs/exec.c:1507:53: sparse: incorrect type in argument 2 (different address spaces)
   fs/exec.c:1507:53:    expected struct fdtable const *fdt
   fs/exec.c:1507:53:    got struct fdtable [noderef] <asn:4>*fdt

vim +1507 fs/exec.c

  1491		bprm->file = file;
  1492		if (fd == AT_FDCWD || filename->name[0] == '/') {
  1493			bprm->filename = filename->name;
  1494		} else {
  1495			if (filename->name[0] == '\0')
  1496				pathbuf = kasprintf(GFP_TEMPORARY, "/dev/fd/%d", fd);
  1497			else
  1498				pathbuf = kasprintf(GFP_TEMPORARY, "/dev/fd/%d/%s",
  1499						    fd, filename->name);
  1500			if (!pathbuf) {
  1501				retval = -ENOMEM;
  1502				goto out_unmark;
  1503			}
  1504			/* Record that a name derived from an O_CLOEXEC fd will be
  1505			 * inaccessible after exec. Relies on having exclusive access to
  1506			 * current->files (due to unshare_files above). */
> 1507			if (close_on_exec(fd, current->files->fdt))
  1508				bprm->interp_flags |= BINPRM_FLAGS_PATH_INACCESSIBLE;
  1509			bprm->filename = pathbuf;
  1510		}
  1511		bprm->interp = bprm->filename;
  1512	
  1513		retval = bprm_mm_init(bprm);
  1514		if (retval)
  1515			goto out_unmark;

---
0-DAY kernel test infrastructure                Open Source Technology Center
http://lists.01.org/mailman/listinfo/kbuild                 Intel Corporation

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




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