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>] [day] [month] [year] [list]
Message-ID: <202312101708.68txSnLI-lkp@intel.com>
Date:   Sun, 10 Dec 2023 18:00:59 +0800
From:   kernel test robot <lkp@...el.com>
To:     Miri Korenblit <miriam.rachel.korenblit@...el.com>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Johannes Berg <johannes.berg@...el.com>,
        Gregory Greenman <gregory.greenman@...el.com>
Subject: drivers/net/wireless/intel/iwlwifi/mvm/time-event.c:705
 iwl_mvm_get_session_prot_id() warn: unsigned 'link_id' is never less than
 zero.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c527f5606aa545233a4d2c6d5c636ed82b8633ef
commit: 1350658373106eace418eea673a058a0285f8334 wifi: iwlwifi: support link_id in SESSION_PROTECTION cmd
date:   7 weeks ago
config: powerpc-randconfig-r071-20231126 (https://download.01.org/0day-ci/archive/20231210/202312101708.68txSnLI-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231210/202312101708.68txSnLI-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/202312101708.68txSnLI-lkp@intel.com/

smatch warnings:
drivers/net/wireless/intel/iwlwifi/mvm/time-event.c:705 iwl_mvm_get_session_prot_id() warn: unsigned 'link_id' is never less than zero.

vim +/link_id +705 drivers/net/wireless/intel/iwlwifi/mvm/time-event.c

   691	
   692	/* Determine whether mac or link id should be used, and validate the link id */
   693	static int iwl_mvm_get_session_prot_id(struct iwl_mvm *mvm,
   694					       struct ieee80211_vif *vif,
   695					       u32 link_id)
   696	{
   697		struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
   698		int ver = iwl_fw_lookup_cmd_ver(mvm->fw,
   699						WIDE_ID(MAC_CONF_GROUP,
   700							SESSION_PROTECTION_CMD), 1);
   701	
   702		if (ver < 2)
   703			return mvmvif->id;
   704	
 > 705		if (WARN(link_id < 0 || !mvmvif->link[link_id],
   706			 "Invalid link ID for session protection: %u\n", link_id))
   707			return -EINVAL;
   708	
   709		if (WARN(ieee80211_vif_is_mld(vif) &&
   710			 !(vif->active_links & BIT(link_id)),
   711			 "Session Protection on an inactive link: %u\n", link_id))
   712			return -EINVAL;
   713	
   714		return mvmvif->link[link_id]->fw_link_id;
   715	}
   716	

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