Re: [PATCH v5] coredump: Add bit 9 of coredump_filter for pre-exit files before dumping

kernel test robot <[email protected]> Tue, 4 Aug 2026 04:49:16 +0800
Newsgroups dev.linux.lists.oe-kbuild-all,org.kernel.vger.linux-fsdevel
Message-ID <[email protected]>
Hi Xin,

kernel test robot noticed the following build warnings:

[auto build test WARNING on brauner-vfs/vfs.all]
[also build test WARNING on akpm-mm/mm-everything linus/master v7.2-rc6 next-20260803]
[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/Xin-Zhao/coredump-Add-bit-9-of-coredump_filter-for-pre-exit-files-before-dumping/20260804-021808
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs.all
patch link:    https://lore.kernel.org/r/20260630075604.52533-1-jackzxcui1989%40163.com
patch subject: [PATCH v5] coredump: Add bit 9 of coredump_filter for pre-exit files before dumping
config: alpha-allmodconfig (https://download.01.org/0day-ci/archive/20260804/[email protected]/config)
compiler: alpha-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260804/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

   In file included from include/linux/array_size.h:5,
                    from include/linux/string.h:6,
                    from fs/file_table.c:9:
   fs/file_table.c: In function '__fput_deferred':
>> fs/file_table.c:576:53: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
     576 |         if (likely(!in_interrupt() && !(task->flags & PF_KTHREAD | PF_DUMPCORE))) {
   include/linux/compiler.h:76:45: note: in definition of macro 'likely'
      76 | # define likely(x)      __builtin_expect(!!(x), 1)
         |                                             ^


vim +576 fs/file_table.c

   561	
   562	static void __fput_deferred(struct file *file)
   563	{
   564		struct task_struct *task = current;
   565	
   566		if (unlikely(!(file->f_mode & (FMODE_BACKING | FMODE_OPENED)))) {
   567			file_free(file);
   568			return;
   569		}
   570	
   571		/*
   572		 * coredump_pre_exit() may release files before dumping core.
   573		 * Cannot use task_work in the case, needs to release files
   574		 * earlier."
   575		 */
 > 576		if (likely(!in_interrupt() && !(task->flags & PF_KTHREAD | PF_DUMPCORE))) {
   577			init_task_work(&file->f_task_work, ____fput);
   578			if (!task_work_add(task, &file->f_task_work, TWA_RESUME))
   579				return;
   580			/*
   581			 * After this task has run exit_task_work(),
   582			 * task_work_add() will fail.  Fall through to delayed
   583			 * fput to avoid leaking *file.
   584			 */
   585		}
   586	
   587		if (llist_add(&file->f_llist, &delayed_fput_list))
   588			schedule_delayed_work(&delayed_fput_work, 1);
   589	}
   590	

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