public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* fs/namespace.c:2867 may_change_propagation() warn: inconsistent indenting
@ 2025-12-11  0:55 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-12-11  0:55 UTC (permalink / raw)
  To: Al Viro; +Cc: oe-kbuild-all, linux-kernel, Pavel Tikhomirov, Christian Brauner

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0048fbb4011ec55c32d3148b2cda56433f273375
commit: cffd0441872e7f6b1fce5e78fb1c99187a291330 use uniform permission checks for all mount propagation changes
date:   4 months ago
config: x86_64-randconfig-161-20251210 (https://download.01.org/0day-ci/archive/20251211/202512110853.cxVpnF0V-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.4.0-5) 12.4.0

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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512110853.cxVpnF0V-lkp@intel.com/

New smatch warnings:
fs/namespace.c:2867 may_change_propagation() warn: inconsistent indenting

Old smatch warnings:
fs/namespace.c:3867 finish_automount() warn: inconsistent returns '&dentry->d_inode->i_rwsem'.

vim +2867 fs/namespace.c

  2861	
  2862	static int may_change_propagation(const struct mount *m)
  2863	{
  2864	        struct mnt_namespace *ns = m->mnt_ns;
  2865	
  2866		 // it must be mounted in some namespace
> 2867		 if (IS_ERR_OR_NULL(ns))         // is_mounted()
  2868			 return -EINVAL;
  2869		 // and the caller must be admin in userns of that namespace
  2870		 if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN))
  2871			 return -EPERM;
  2872		 return 0;
  2873	}
  2874	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* fs/namespace.c:2867 may_change_propagation() warn: inconsistent indenting
@ 2026-04-10 22:50 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-04-10 22:50 UTC (permalink / raw)
  To: Al Viro; +Cc: oe-kbuild-all, linux-kernel, Pavel Tikhomirov, Christian Brauner

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   7c6c4ed80b874f721bc7c2c937e098c56e37d2f0
commit: cffd0441872e7f6b1fce5e78fb1c99187a291330 use uniform permission checks for all mount propagation changes
date:   8 months ago
config: x86_64-randconfig-161-20260410 (https://download.01.org/0day-ci/archive/20260411/202604110609.NRLTTg7G-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.4.0-5) 12.4.0
smatch: v0.5.0-9004-gb810ac53

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
| Fixes: cffd0441872e ("use uniform permission checks for all mount propagation changes")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604110609.NRLTTg7G-lkp@intel.com/

smatch warnings:
fs/namespace.c:2867 may_change_propagation() warn: inconsistent indenting

vim +2867 fs/namespace.c

  2861	
  2862	static int may_change_propagation(const struct mount *m)
  2863	{
  2864	        struct mnt_namespace *ns = m->mnt_ns;
  2865	
  2866		 // it must be mounted in some namespace
> 2867		 if (IS_ERR_OR_NULL(ns))         // is_mounted()
  2868			 return -EINVAL;
  2869		 // and the caller must be admin in userns of that namespace
  2870		 if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN))
  2871			 return -EPERM;
  2872		 return 0;
  2873	}
  2874	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-10 22:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-10 22:50 fs/namespace.c:2867 may_change_propagation() warn: inconsistent indenting kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2025-12-11  0:55 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox