|
Message-ID: <202104272256.9Y5ZQxrO-lkp@intel.com> Date: Thu, 29 Apr 2021 17:04:23 +0300 From: Dan Carpenter <dan.carpenter@...cle.com> To: kbuild@...ts.01.org, legion@...nel.org, LKML <linux-kernel@...r.kernel.org>, Kernel Hardening <kernel-hardening@...ts.openwall.com>, Linux Containers <containers@...ts.linux-foundation.org>, linux-mm@...ck.org Cc: lkp@...el.com, kbuild-all@...ts.01.org, Alexey Gladkov <legion@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>, Linux Memory Management List <linux-mm@...ck.org>, Christian Brauner <christian.brauner@...ntu.com>, "Eric W . Biederman" <ebiederm@...ssion.com>, Jann Horn <jannh@...gle.com> Subject: Re: [PATCH v11 4/9] Reimplement RLIMIT_NPROC on top of ucounts Hi, url: https://github.com/0day-ci/linux/commits/legion-kernel-org/Count-rlimits-in-each-user-namespace/20210427-162857 base: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next config: arc-randconfig-m031-20210426 (attached as .config) compiler: arceb-elf-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@...el.com> Reported-by: Dan Carpenter <dan.carpenter@...cle.com> smatch warnings: kernel/ucount.c:270 dec_rlimit_ucounts() error: uninitialized symbol 'new'. vim +/new +270 kernel/ucount.c 176ec2b092cc22 Alexey Gladkov 2021-04-22 260 bool dec_rlimit_ucounts(struct ucounts *ucounts, enum ucount_type type, long v) 176ec2b092cc22 Alexey Gladkov 2021-04-22 261 { 176ec2b092cc22 Alexey Gladkov 2021-04-22 262 struct ucounts *iter; 176ec2b092cc22 Alexey Gladkov 2021-04-22 263 long new; ^^^^^^^^ 176ec2b092cc22 Alexey Gladkov 2021-04-22 264 for (iter = ucounts; iter; iter = iter->ns->ucounts) { 176ec2b092cc22 Alexey Gladkov 2021-04-22 265 long dec = atomic_long_add_return(-v, &iter->ucount[type]); 176ec2b092cc22 Alexey Gladkov 2021-04-22 266 WARN_ON_ONCE(dec < 0); 176ec2b092cc22 Alexey Gladkov 2021-04-22 267 if (iter == ucounts) 176ec2b092cc22 Alexey Gladkov 2021-04-22 268 new = dec; 176ec2b092cc22 Alexey Gladkov 2021-04-22 269 } 176ec2b092cc22 Alexey Gladkov 2021-04-22 @270 return (new == 0); ^^^^^^^^ I don't know if this is a bug or not, but I can definitely tell why the static checker complains about it. 176ec2b092cc22 Alexey Gladkov 2021-04-22 271 } --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.