linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tip:locking/futex 2/6] kernel/futex/core.c:1748:2-8: WARNING: NULL check before some freeing functions is not needed.
@ 2025-07-17 15:49 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-07-17 15:49 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: oe-kbuild-all, linux-kernel, x86, Sebastian Andrzej Siewior

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/futex
head:   7497e947bc1d3f761b46c2105c8ae37af98add54
commit: 56180dd20c19e5b0fa34822997a9ac66b517e7b3 [2/6] futex: Use RCU-based per-CPU reference counting instead of rcuref_t
config: microblaze-randconfig-r052-20250717 (https://download.01.org/0day-ci/archive/20250717/202507172340.xrO8KXQq-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 11.5.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/202507172340.xrO8KXQq-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> kernel/futex/core.c:1748:2-8: WARNING: NULL check before some freeing functions is not needed.

vim +1748 kernel/futex/core.c

56180dd20c19e5 Peter Zijlstra            2025-07-10  1739  
80367ad01d93ac Sebastian Andrzej Siewior 2025-04-16  1740  void futex_hash_free(struct mm_struct *mm)
80367ad01d93ac Sebastian Andrzej Siewior 2025-04-16  1741  {
bd54df5ea7cada Sebastian Andrzej Siewior 2025-04-16  1742  	struct futex_private_hash *fph;
bd54df5ea7cada Sebastian Andrzej Siewior 2025-04-16  1743  
56180dd20c19e5 Peter Zijlstra            2025-07-10  1744  	free_percpu(mm->futex_ref);
bd54df5ea7cada Sebastian Andrzej Siewior 2025-04-16  1745  	kvfree(mm->futex_phash_new);
bd54df5ea7cada Sebastian Andrzej Siewior 2025-04-16  1746  	fph = rcu_dereference_raw(mm->futex_phash);
56180dd20c19e5 Peter Zijlstra            2025-07-10  1747  	if (fph)
bd54df5ea7cada Sebastian Andrzej Siewior 2025-04-16 @1748  		kvfree(fph);
bd54df5ea7cada Sebastian Andrzej Siewior 2025-04-16  1749  }
bd54df5ea7cada Sebastian Andrzej Siewior 2025-04-16  1750  

:::::: The code at line 1748 was first introduced by commit
:::::: bd54df5ea7cadac520e346d5f0fe5d58e635b6ba futex: Allow to resize the private local hash

:::::: TO: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
:::::: CC: Peter Zijlstra <peterz@infradead.org>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-07-17 15:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-17 15:49 [tip:locking/futex 2/6] kernel/futex/core.c:1748:2-8: WARNING: NULL check before some freeing functions is not needed 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;
as well as URLs for NNTP newsgroup(s).