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: <202506140306.tuIoz8rN-lkp@intel.com>
Date: Sat, 14 Jun 2025 04:02:15 +0800
From: kernel test robot <lkp@...el.com>
To: Changwoo Min <changwoo@...lia.com>, lukasz.luba@....com,
	rafael@...nel.org, len.brown@...el.com, pavel@...nel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	christian.loehle@....com, tj@...nel.org, kernel-dev@...lia.com,
	linux-pm@...r.kernel.org, sched-ext@...ts.linux.dev,
	linux-kernel@...r.kernel.org, Changwoo Min <changwoo@...lia.com>
Subject: Re: [PATCH v2 09/10] PM: EM: Implement
 em_notify_pd_created/updated().

Hi Changwoo,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.16-rc1 next-20250613]
[cannot apply to amd-pstate/linux-next amd-pstate/bleeding-edge]
[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/Changwoo-Min/PM-EM-Add-em-yaml-and-autogen-files/20250613-174859
base:   linus/master
patch link:    https://lore.kernel.org/r/20250613094428.267791-10-changwoo%40igalia.com
patch subject: [PATCH v2 09/10] PM: EM: Implement em_notify_pd_created/updated().
config: i386-randconfig-001-20250614 (https://download.01.org/0day-ci/archive/20250614/202506140306.tuIoz8rN-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250614/202506140306.tuIoz8rN-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/202506140306.tuIoz8rN-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> kernel/power/em_netlink.c:234:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
     234 |         if (!hdr)
         |             ^~~~
   kernel/power/em_netlink.c:249:9: note: uninitialized use occurs here
     249 |         return ret;
         |                ^~~
   kernel/power/em_netlink.c:234:2: note: remove the 'if' if its condition is always false
     234 |         if (!hdr)
         |         ^~~~~~~~~
     235 |                 goto out_free_msg;
         |                 ~~~~~~~~~~~~~~~~~
   kernel/power/em_netlink.c:221:17: note: initialize the variable 'ret' to silence this warning
     221 |         int msg_sz, ret;
         |                        ^
         |                         = 0
   1 warning generated.


vim +234 kernel/power/em_netlink.c

   215	
   216	
   217	/**************************** Event encoding *********************************/
   218	static int __em_notify_pd_table(const struct em_perf_domain *pd, int ntf_type)
   219	{
   220		struct sk_buff *msg;
   221		int msg_sz, ret;
   222		void *hdr;
   223	
   224		if (!genl_has_listeners(&em_nl_family, &init_net, EM_NLGRP_EVENT))
   225			return 0;
   226	
   227		msg_sz = __em_nl_get_pd_table_size(pd);
   228	
   229		msg = genlmsg_new(msg_sz, GFP_KERNEL);
   230		if (!msg)
   231			return -ENOMEM;
   232	
   233		hdr = genlmsg_put(msg, 0, 0, &em_nl_family, 0, ntf_type);
 > 234		if (!hdr)
   235			goto out_free_msg;
   236	
   237		ret = __em_nl_get_pd_table(msg, pd);
   238		if (ret)
   239			goto out_free_msg;
   240	
   241		genlmsg_end(msg, hdr);
   242	
   243		genlmsg_multicast(&em_nl_family, msg, 0, EM_NLGRP_EVENT, GFP_KERNEL);
   244	
   245		return 0;
   246	
   247	out_free_msg:
   248		nlmsg_free(msg);
   249		return ret;
   250	}
   251	

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