From: kernel test robot <lkp@intel.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v3 1/1] pidfd: implement PIDFD_THREAD flag for pidfd_open()
Date: Thu, 1 Feb 2024 15:23:13 +0800 [thread overview]
Message-ID: <202402011558.BUpYBZyG-lkp@intel.com> (raw)
In-Reply-To: <20240131132602.GA23641@redhat.com>
Hi Oleg,
kernel test robot noticed the following build warnings:
[auto build test WARNING on brauner-vfs/vfs.all]
[cannot apply to kees/for-next/execve linus/master v6.8-rc2 next-20240201]
[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/Oleg-Nesterov/pidfd-implement-PIDFD_THREAD-flag-for-pidfd_open/20240131-213408
base: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs.all
patch link: https://lore.kernel.org/r/20240131132602.GA23641%40redhat.com
patch subject: [PATCH v3 1/1] pidfd: implement PIDFD_THREAD flag for pidfd_open()
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20240201/202402011558.BUpYBZyG-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240201/202402011558.BUpYBZyG-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402011558.BUpYBZyG-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/fork.c:2201:70: warning: if statement has empty body [-Wempty-body]
2201 | if (!pid || !pid_has_task(pid, thread ? PIDTYPE_PID : PIDTYPE_TGID));
| ^
kernel/fork.c:2201:70: note: put the semicolon on a separate line to silence this warning
1 warning generated.
vim +2201 kernel/fork.c
2169
2170 /**
2171 * pidfd_prepare - allocate a new pidfd_file and reserve a pidfd
2172 * @pid: the struct pid for which to create a pidfd
2173 * @flags: flags of the new @pidfd
2174 * @ret: Where to return the pidfd.
2175 *
2176 * Allocate a new file that stashes @pid and reserve a new pidfd number in the
2177 * caller's file descriptor table. The pidfd is reserved but not installed yet.
2178 *
2179 * The helper verifies that @pid is still in use, without PIDFD_THREAD the
2180 * task identified by @pid must be a thread-group leader.
2181 *
2182 * If this function returns successfully the caller is responsible to either
2183 * call fd_install() passing the returned pidfd and pidfd file as arguments in
2184 * order to install the pidfd into its file descriptor table or they must use
2185 * put_unused_fd() and fput() on the returned pidfd and pidfd file
2186 * respectively.
2187 *
2188 * This function is useful when a pidfd must already be reserved but there
2189 * might still be points of failure afterwards and the caller wants to ensure
2190 * that no pidfd is leaked into its file descriptor table.
2191 *
2192 * Return: On success, a reserved pidfd is returned from the function and a new
2193 * pidfd file is returned in the last argument to the function. On
2194 * error, a negative error code is returned from the function and the
2195 * last argument remains unchanged.
2196 */
2197 int pidfd_prepare(struct pid *pid, unsigned int flags, struct file **ret)
2198 {
2199 bool thread = flags & PIDFD_THREAD;
2200
> 2201 if (!pid || !pid_has_task(pid, thread ? PIDTYPE_PID : PIDTYPE_TGID));
2202 return -EINVAL;
2203
2204 return __pidfd_prepare(pid, flags, ret);
2205 }
2206
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next parent reply other threads:[~2024-02-01 7:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240131132602.GA23641@redhat.com>
2024-02-01 7:23 ` kernel test robot [this message]
2024-02-01 8:47 ` [PATCH v3 1/1] pidfd: implement PIDFD_THREAD flag for pidfd_open() Oleg Nesterov
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=202402011558.BUpYBZyG-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oleg@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox