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: [vbabka-slab:slab/for-7.0/obj_metadata 8/10] mm/slub.c:904 need_slab_obj_exts() warn: bitwise AND condition is false here
Date: Tue, 20 Jan 2026 02:51:36 +0800	[thread overview]
Message-ID: <202601200218.2dRYmU4Q-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-mm@kvack.org
TO: Harry Yoo <harry.yoo@oracle.com>
CC: Vlastimil Babka <vbabka@suse.cz>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git slab/for-7.0/obj_metadata
head:   6edcc2867ee1ba95ae6c7695d66124bfdf0771a1
commit: 4fad56bdb6b4c4bc0ea2d919df1ae4eef7b69919 [8/10] mm/slab: save memory by allocating slabobj_ext array from leftover
:::::: branch date: 11 hours ago
:::::: commit date: 11 hours ago
config: nios2-randconfig-r072-20260119 (https://download.01.org/0day-ci/archive/20260120/202601200218.2dRYmU4Q-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
smatch version: v0.5.0-8985-g2614ff1a

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/202601200218.2dRYmU4Q-lkp@intel.com/

New smatch warnings:
mm/slub.c:904 need_slab_obj_exts() warn: bitwise AND condition is false here

Old smatch warnings:
arch/nios2/include/asm/thread_info.h:62 current_thread_info() error: uninitialized symbol 'sp'.

vim +904 mm/slub.c

4fad56bdb6b4c4b Harry Yoo 2026-01-13  890  
4fad56bdb6b4c4b Harry Yoo 2026-01-13  891  /*
4fad56bdb6b4c4b Harry Yoo 2026-01-13  892   * Check if memory cgroup or memory allocation profiling is enabled.
4fad56bdb6b4c4b Harry Yoo 2026-01-13  893   * If enabled, SLUB tries to reduce memory overhead of accounting
4fad56bdb6b4c4b Harry Yoo 2026-01-13  894   * slab objects. If neither is enabled when this function is called,
4fad56bdb6b4c4b Harry Yoo 2026-01-13  895   * the optimization is simply skipped to avoid affecting caches that do not
4fad56bdb6b4c4b Harry Yoo 2026-01-13  896   * need slabobj_ext metadata.
4fad56bdb6b4c4b Harry Yoo 2026-01-13  897   *
4fad56bdb6b4c4b Harry Yoo 2026-01-13  898   * However, this may disable optimization when memory cgroup or memory
4fad56bdb6b4c4b Harry Yoo 2026-01-13  899   * allocation profiling is used, but slabs are created too early
4fad56bdb6b4c4b Harry Yoo 2026-01-13  900   * even before those subsystems are initialized.
4fad56bdb6b4c4b Harry Yoo 2026-01-13  901   */
4fad56bdb6b4c4b Harry Yoo 2026-01-13  902  static inline bool need_slab_obj_exts(struct kmem_cache *s)
4fad56bdb6b4c4b Harry Yoo 2026-01-13  903  {
4fad56bdb6b4c4b Harry Yoo 2026-01-13 @904  	if (memcg_kmem_online() && (s->flags & SLAB_ACCOUNT))
4fad56bdb6b4c4b Harry Yoo 2026-01-13  905  		return true;
4fad56bdb6b4c4b Harry Yoo 2026-01-13  906  
4fad56bdb6b4c4b Harry Yoo 2026-01-13  907  	if (mem_alloc_profiling_enabled())
4fad56bdb6b4c4b Harry Yoo 2026-01-13  908  		return true;
4fad56bdb6b4c4b Harry Yoo 2026-01-13  909  
4fad56bdb6b4c4b Harry Yoo 2026-01-13  910  	return false;
4fad56bdb6b4c4b Harry Yoo 2026-01-13  911  }
4fad56bdb6b4c4b Harry Yoo 2026-01-13  912  

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

                 reply	other threads:[~2026-01-19 18:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202601200218.2dRYmU4Q-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.