All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH] audit: add FSOPEN record to log filesystem name
Date: Sat, 8 Aug 2026 09:54:27 +0800	[thread overview]
Message-ID: <202608080923.Lf400oFq-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20260701132410.711205-1-rrobaina@redhat.com>
References: <20260701132410.711205-1-rrobaina@redhat.com>
TO: Ricardo Robaina <rrobaina@redhat.com>
TO: audit@vger.kernel.org
TO: linux-fsdevel@vger.kernel.org
TO: linux-kernel@vger.kernel.org
CC: paul@paul-moore.com
CC: eparis@redhat.com
CC: viro@zeniv.linux.org.uk
CC: brauner@kernel.org
CC: jack@suse.cz
CC: Ricardo Robaina <rrobaina@redhat.com>

Hi Ricardo,

kernel test robot noticed the following build warnings:

[auto build test WARNING on pcmoore-audit/next]
[also build test WARNING on brauner-vfs/vfs.all linus/master v7.2-rc6 next-20260807]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ricardo-Robaina/audit-add-FSOPEN-record-to-log-filesystem-name/20260807-192421
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git next
patch link:    https://lore.kernel.org/r/20260701132410.711205-1-rrobaina%40redhat.com
patch subject: [PATCH] audit: add FSOPEN record to log filesystem name
:::::: branch date: 14 hours ago
:::::: commit date: 14 hours ago
config: sparc-randconfig-r071-20260808 (https://download.01.org/0day-ci/archive/20260808/202608080923.Lf400oFq-lkp@intel.com/config)
compiler: sparc-linux-gcc (GCC) 8.5.0
smatch: v0.5.0-9187-g5189e3fb

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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202608080923.Lf400oFq-lkp@intel.com/

New smatch warnings:
fs/fsopen.c:154 __do_sys_fsopen() warn: passing freed memory 'fs_name' (line 139)
fs/fsopen.c:154 __do_sys_fsopen() warn: passing freed memory 'fs_name' (line 139)

Old smatch warnings:
fs/fsopen.c:481 __do_sys_fsconfig() warn: variable dereferenced before check 'param.name' (see line 450)
fs/fsopen.c:481 __do_sys_fsconfig() warn: variable dereferenced before check 'param.name' (see line 450)

vim +/fs_name +154 fs/fsopen.c

007ec26cdc9fef David Howells   2018-11-01  113  
24dcb3d90a1f67 David Howells   2018-11-01  114  /*
24dcb3d90a1f67 David Howells   2018-11-01  115   * Open a filesystem by name so that it can be configured for mounting.
24dcb3d90a1f67 David Howells   2018-11-01  116   *
24dcb3d90a1f67 David Howells   2018-11-01  117   * We are allowed to specify a container in which the filesystem will be
24dcb3d90a1f67 David Howells   2018-11-01  118   * opened, thereby indicating which namespaces will be used (notably, which
24dcb3d90a1f67 David Howells   2018-11-01  119   * network namespace will be used for network filesystems).
24dcb3d90a1f67 David Howells   2018-11-01  120   */
24dcb3d90a1f67 David Howells   2018-11-01  121  SYSCALL_DEFINE2(fsopen, const char __user *, _fs_name, unsigned int, flags)
24dcb3d90a1f67 David Howells   2018-11-01  122  {
24dcb3d90a1f67 David Howells   2018-11-01  123  	struct file_system_type *fs_type;
24dcb3d90a1f67 David Howells   2018-11-01  124  	struct fs_context *fc;
24dcb3d90a1f67 David Howells   2018-11-01  125  	const char *fs_name;
007ec26cdc9fef David Howells   2018-11-01  126  	int ret;
24dcb3d90a1f67 David Howells   2018-11-01  127  
a5f85d7834f7e1 Al Viro         2022-03-01  128  	if (!may_mount())
24dcb3d90a1f67 David Howells   2018-11-01  129  		return -EPERM;
24dcb3d90a1f67 David Howells   2018-11-01  130  
24dcb3d90a1f67 David Howells   2018-11-01  131  	if (flags & ~FSOPEN_CLOEXEC)
24dcb3d90a1f67 David Howells   2018-11-01  132  		return -EINVAL;
24dcb3d90a1f67 David Howells   2018-11-01  133  
24dcb3d90a1f67 David Howells   2018-11-01  134  	fs_name = strndup_user(_fs_name, PAGE_SIZE);
24dcb3d90a1f67 David Howells   2018-11-01  135  	if (IS_ERR(fs_name))
24dcb3d90a1f67 David Howells   2018-11-01  136  		return PTR_ERR(fs_name);
24dcb3d90a1f67 David Howells   2018-11-01  137  
24dcb3d90a1f67 David Howells   2018-11-01  138  	fs_type = get_fs_type(fs_name);
24dcb3d90a1f67 David Howells   2018-11-01 @139  	kfree(fs_name);
24dcb3d90a1f67 David Howells   2018-11-01  140  	if (!fs_type)
24dcb3d90a1f67 David Howells   2018-11-01  141  		return -ENODEV;
24dcb3d90a1f67 David Howells   2018-11-01  142  
24dcb3d90a1f67 David Howells   2018-11-01  143  	fc = fs_context_for_mount(fs_type, 0);
24dcb3d90a1f67 David Howells   2018-11-01  144  	put_filesystem(fs_type);
24dcb3d90a1f67 David Howells   2018-11-01  145  	if (IS_ERR(fc))
24dcb3d90a1f67 David Howells   2018-11-01  146  		return PTR_ERR(fc);
24dcb3d90a1f67 David Howells   2018-11-01  147  
24dcb3d90a1f67 David Howells   2018-11-01  148  	fc->phase = FS_CONTEXT_CREATE_PARAMS;
007ec26cdc9fef David Howells   2018-11-01  149  
007ec26cdc9fef David Howells   2018-11-01  150  	ret = fscontext_alloc_log(fc);
007ec26cdc9fef David Howells   2018-11-01  151  	if (ret < 0)
007ec26cdc9fef David Howells   2018-11-01  152  		goto err_fc;
007ec26cdc9fef David Howells   2018-11-01  153  
aee6439c3eb4ef Ricardo Robaina 2026-07-01 @154  	audit_log_fsopen(fs_name);
aee6439c3eb4ef Ricardo Robaina 2026-07-01  155  
24dcb3d90a1f67 David Howells   2018-11-01  156  	return fscontext_create_fd(fc, flags & FSOPEN_CLOEXEC ? O_CLOEXEC : 0);
007ec26cdc9fef David Howells   2018-11-01  157  
007ec26cdc9fef David Howells   2018-11-01  158  err_fc:
007ec26cdc9fef David Howells   2018-11-01  159  	put_fs_context(fc);
007ec26cdc9fef David Howells   2018-11-01  160  	return ret;
24dcb3d90a1f67 David Howells   2018-11-01  161  }
ecdab150fddb42 David Howells   2018-11-01  162  

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

             reply	other threads:[~2026-08-08  1:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-08  1:54 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-07-01 13:24 [PATCH] audit: add FSOPEN record to log filesystem name Ricardo Robaina
2026-07-02  6:59 ` Christian Brauner
2026-07-02 12:18   ` Ricardo Robaina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202608080923.Lf400oFq-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.