lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202510171538.n1mAFlu0-lkp@intel.com>
Date: Fri, 17 Oct 2025 15:28:41 +0800
From: kernel test robot <lkp@...el.com>
To: XueBing Chen <chenxb_99091@....com>, akpm@...ux-foundation.org
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	XueBing Chen <chenxb_99091@....com>
Subject: Re: [PATCH] lib/bsearch: add mutex protection for thread-safe binary
 search

Hi XueBing,

kernel test robot noticed the following build warnings:

[auto build test WARNING on akpm-mm/mm-nonmm-unstable]
[also build test WARNING on akpm-mm/mm-everything linus/master v6.18-rc1 next-20251016]
[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/XueBing-Chen/lib-bsearch-add-mutex-protection-for-thread-safe-binary-search/20251016-171911
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-nonmm-unstable
patch link:    https://lore.kernel.org/r/20251016090640.6331-1-chenxb_99091%40126.com
patch subject: [PATCH] lib/bsearch: add mutex protection for thread-safe binary search
config: arm-randconfig-r121-20251017 (https://download.01.org/0day-ci/archive/20251017/202510171538.n1mAFlu0-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/20251017/202510171538.n1mAFlu0-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510171538.n1mAFlu0-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> lib/bsearch.c:34:1: sparse: sparse: symbol 'cmp_mutex' was not declared. Should it be static?

vim +/cmp_mutex +34 lib/bsearch.c

    15	
    16	/*
    17	 * bsearch - binary search an array of elements
    18	 * @key: pointer to item being searched for
    19	 * @base: pointer to first element to search
    20	 * @num: number of elements
    21	 * @size: size of each element
    22	 * @cmp: pointer to comparison function
    23	 *
    24	 * This function does a binary search on the given array.  The
    25	 * contents of the array should already be in ascending sorted order
    26	 * under the provided comparison function.
    27	 *
    28	 * Note that the key need not have the same type as the elements in
    29	 * the array, e.g. key could be a string and the comparison function
    30	 * could compare the string with the struct's name field.  However, if
    31	 * the key and elements in the array are of the same type, you can use
    32	 * the same comparison function for both sort() and bsearch().
    33	 */
  > 34	DEFINE_MUTEX(cmp_mutex);

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ