lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202510231548.kt6wvifE-lkp@intel.com>
Date: Thu, 23 Oct 2025 15:29:08 +0800
From: kernel test robot <lkp@...el.com>
To: Christian Brauner <brauner@...nel.org>, linux-fsdevel@...r.kernel.org,
	Josef Bacik <josef@...icpanda.com>,
	Jeff Layton <jlayton@...nel.org>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	Jann Horn <jannh@...gle.com>, Mike Yuan <me@...dnzj.com>,
	Zbigniew Jędrzejewski-Szmek <zbyszek@...waw.pl>,
	Lennart Poettering <mzxreary@...inter.de>,
	Daan De Meyer <daan.j.demeyer@...il.com>,
	Aleksa Sarai <cyphar@...har.com>,
	Amir Goldstein <amir73il@...il.com>, Tejun Heo <tj@...nel.org>,
	Johannes Weiner <hannes@...xchg.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Alexander Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>,
	linux-kernel@...r.kernel.org, cgroups@...r.kernel.org,
	bpf@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
	Arnd Bergmann <arnd@...db.de>,
	Christian Brauner <brauner@...nel.org>
Subject: Re: [PATCH v2 10/63] ns: add active reference count

Hi Christian,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 3a8660878839faadb4f1a6dd72c3179c1df56787]

url:    https://github.com/intel-lab-lkp/linux/commits/Christian-Brauner/libfs-allow-to-specify-s_d_flags/20251023-004014
base:   3a8660878839faadb4f1a6dd72c3179c1df56787
patch link:    https://lore.kernel.org/r/20251022-work-namespace-nstree-listns-v2-10-71a588572371%40kernel.org
patch subject: [PATCH v2 10/63] ns: add active reference count
config: i386-buildonly-randconfig-001-20251023 (https://download.01.org/0day-ci/archive/20251023/202510231548.kt6wvifE-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251023/202510231548.kt6wvifE-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510231548.kt6wvifE-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> kernel/cred.c:313:21: warning: variable 'new' is uninitialized when used here [-Wuninitialized]
     313 |                 ns_ref_active_get(new->user_ns);
         |                                   ^~~
   include/linux/ns_common.h:258:11: note: expanded from macro 'ns_ref_active_get'
     258 |         do { if (__ns) __ns_ref_active_get(to_ns_common(__ns)); } while (0)
         |                  ^~~~
   kernel/cred.c:292:18: note: initialize the variable 'new' to silence this warning
     292 |         struct cred *new;
         |                         ^
         |                          = NULL
   1 warning generated.


vim +/new +313 kernel/cred.c

   298	
   299		if (
   300	#ifdef CONFIG_KEYS
   301			!p->cred->thread_keyring &&
   302	#endif
   303			clone_flags & CLONE_THREAD
   304		    ) {
   305			p->real_cred = get_cred_many(p->cred, 2);
   306			kdebug("share_creds(%p{%ld})",
   307			       p->cred, atomic_long_read(&p->cred->usage));
   308			inc_rlimit_ucounts(task_ucounts(p), UCOUNT_RLIMIT_NPROC, 1);
   309			/*
   310			 * Each task gets its own active reference, even if
   311			 * CLONE_THREAD shares the cred structure.
   312			 */
 > 313			ns_ref_active_get(new->user_ns);
   314			return 0;
   315		}
   316	
   317		new = prepare_creds();
   318		if (!new)
   319			return -ENOMEM;
   320	
   321		if (clone_flags & CLONE_NEWUSER) {
   322			ret = create_user_ns(new);
   323			if (ret < 0)
   324				goto error_put;
   325			ret = set_cred_ucounts(new);
   326			if (ret < 0)
   327				goto error_put;
   328		}
   329	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ