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: <202508222315.aWhqo6ik-lkp@intel.com>
Date: Fri, 22 Aug 2025 23:53:46 +0800
From: kernel test robot <lkp@...el.com>
To: Ethan Ferguson <ethan.ferguson@...ier.com>, linkinjeon@...nel.org,
	sj1557.seo@...sung.com, yuezhang.mo@...y.com
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	Ethan Ferguson <ethan.ferguson@...ier.com>
Subject: Re: [PATCH v3 1/1] exfat: Add support for FS_IOC_{GET,SET}FSLABEL

Hi Ethan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on brauner-vfs/vfs.all]
[also build test WARNING on linus/master v6.17-rc2 next-20250822]
[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/Ethan-Ferguson/exfat-Add-support-for-FS_IOC_-GET-SET-FSLABEL/20250821-231649
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs.all
patch link:    https://lore.kernel.org/r/20250821150926.1025302-2-ethan.ferguson%40zetier.com
patch subject: [PATCH v3 1/1] exfat: Add support for FS_IOC_{GET,SET}FSLABEL
config: s390-randconfig-001-20250822 (https://download.01.org/0day-ci/archive/20250822/202508222315.aWhqo6ik-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project d26ea02060b1c9db751d188b2edb0059a9eb273d)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250822/202508222315.aWhqo6ik-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/202508222315.aWhqo6ik-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from <built-in>:3:
   In file included from include/linux/compiler_types.h:171:
   include/linux/compiler-clang.h:37:9: warning: '__SANITIZE_THREAD__' macro redefined [-Wmacro-redefined]
      37 | #define __SANITIZE_THREAD__
         |         ^
   <built-in>:368:9: note: previous definition is here
     368 | #define __SANITIZE_THREAD__ 1
         |         ^
>> fs/exfat/super.c:727:6: warning: variable 'bh' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
     727 |         if (uniname->name_len > EXFAT_VOLUME_LABEL_LEN) {
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/exfat/super.c:757:6: note: uninitialized use occurs here
     757 |         if (bh) {
         |             ^~
   fs/exfat/super.c:727:2: note: remove the 'if' if its condition is always false
     727 |         if (uniname->name_len > EXFAT_VOLUME_LABEL_LEN) {
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     728 |                 ret = -EINVAL;
         |                 ~~~~~~~~~~~~~~
     729 |                 goto cleanup;
         |                 ~~~~~~~~~~~~~
     730 |         }
         |         ~
   fs/exfat/super.c:724:24: note: initialize the variable 'bh' to silence this warning
     724 |         struct buffer_head *bh;
         |                               ^
         |                                = NULL
   2 warnings generated.


vim +727 fs/exfat/super.c

   718	
   719	int exfat_write_volume_label(struct super_block *sb,
   720				     struct exfat_uni_name *uniname)
   721	{
   722		int ret, i;
   723		struct exfat_sb_info *sbi = EXFAT_SB(sb);
   724		struct buffer_head *bh;
   725		struct exfat_dentry *ep;
   726	
 > 727		if (uniname->name_len > EXFAT_VOLUME_LABEL_LEN) {
   728			ret = -EINVAL;
   729			goto cleanup;
   730		}
   731	
   732		ret = exfat_get_volume_label_ptrs(sb, &bh, &ep, true);
   733		if (ret < 0)
   734			goto cleanup;
   735	
   736		ret = exfat_alloc_volume_label(sb);
   737		if (ret < 0)
   738			goto cleanup;
   739	
   740		memcpy(sbi->volume_label, uniname->name,
   741		       uniname->name_len * sizeof(short));
   742	
   743		mutex_lock(&sbi->s_lock);
   744		for (i = 0; i < uniname->name_len; i++)
   745			ep->dentry.volume_label.volume_label[i] =
   746				cpu_to_le16(sbi->volume_label[i]);
   747		// Fill the rest of the str with 0x0000
   748		for (; i < EXFAT_VOLUME_LABEL_LEN; i++)
   749			ep->dentry.volume_label.volume_label[i] = 0x0000;
   750	
   751		ep->dentry.volume_label.char_count = uniname->name_len;
   752		mutex_unlock(&sbi->s_lock);
   753	
   754		ret = 0;
   755	
   756	cleanup:
   757		if (bh) {
   758			exfat_update_bh(bh, true);
   759			brelse(bh);
   760		}
   761	
   762		return ret;
   763	}
   764	

-- 
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