Re: [PATCH v4] pid_ns: Introduce ioctl to set vector of ns_last_pid's on ns hierarhy

From: kbuild test robot
Date: Sat Apr 29 2017 - 05:18:30 EST


Hi Kirill,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.11-rc8 next-20170428]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Kirill-Tkhai/pid_ns-Introduce-ioctl-to-set-vector-of-ns_last_pid-s-on-ns-hierarhy/20170429-155011
config: i386-defconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All errors (new ones prefixed by >>):

kernel/pid_namespace.c: In function 'pidns_set_last_pid_vec':
>> kernel/pid_namespace.c:450:38: error: 'pid_max' undeclared (first use in this function)
if (!top || pid[i] < 0 || pid[i] > pid_max)
^~~~~~~
kernel/pid_namespace.c:450:38: note: each undeclared identifier is reported only once for each function it appears in

vim +/pid_max +450 kernel/pid_namespace.c

444 if (copy_from_user(pid, &vec->pid[0], nr * sizeof(pid_t)) != 0)
445 return -EFAULT;
446
447 top = pid_ns;
448 for (i = 0; i < nr-1; i++) {
449 top = top->parent;
> 450 if (!top || pid[i] < 0 || pid[i] > pid_max)
451 return -EINVAL;
452 }
453 if (!ns_capable(top->user_ns, CAP_SYS_ADMIN))

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

Attachment: .config.gz
Description: application/gzip