Re: [PATCH] seccomp: Add SECCOMP_CLONE_FILTER operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tom,

kernel test robot noticed the following build warnings:

[auto build test WARNING on kees/for-next/seccomp]
[also build test WARNING on linus/master v6.17-rc4 next-20250904]
[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/Tom-Hromatka/seccomp-Add-SECCOMP_CLONE_FILTER-operation/20250904-043943
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/seccomp
patch link:    https://lore.kernel.org/r/20250903203805.1335307-1-tom.hromatka%40oracle.com
patch subject: [PATCH] seccomp: Add SECCOMP_CLONE_FILTER operation
config: x86_64-randconfig-074-20250904 (https://download.01.org/0day-ci/archive/20250904/202509041931.XtQcy27H-lkp@xxxxxxxxx/config)
compiler: gcc-13 (Debian 13.3.0-16) 13.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250904/202509041931.XtQcy27H-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509041931.XtQcy27H-lkp@xxxxxxxxx/

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   samples/seccomp/clone-filter.c: In function 'main':
>> samples/seccomp/clone-filter.c:142:9: warning: 'ret' may be used uninitialized [-Wmaybe-uninitialized]
     142 |         exit(ret);
         |         ^~~~~~~~~
   samples/seccomp/clone-filter.c:113:13: note: 'ret' was declared here
     113 |         int ret, status;
         |             ^~~


vim +/ret +142 samples/seccomp/clone-filter.c

   109	
   110	int main(void)
   111	{
   112		pid_t ref_pid = -1, child_pid = -1;
   113		int ret, status;
   114	
   115		ref_pid = fork();
   116		if (ref_pid < 0)
   117			exit(errno);
   118		else if (ref_pid == 0)
   119			do_ref_filter();
   120	
   121		child_pid = fork();
   122		if (child_pid < 0)
   123			goto out;
   124		else if (child_pid == 0)
   125			do_child_process(ref_pid);
   126	
   127		waitpid(child_pid, &status, 0);
   128		if (WEXITSTATUS(status) != 0) {
   129			perror("child process failed");
   130			ret = WEXITSTATUS(status);
   131			goto out;
   132		}
   133	
   134		ret = 0;
   135	
   136	out:
   137		if (ref_pid != -1)
   138			kill(ref_pid, SIGKILL);
   139		if (child_pid != -1)
   140			kill(child_pid, SIGKILL);
   141	
 > 142		exit(ret);

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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux