Search Linux Wireless

Re: [PATCH] Fix: Ensure auth_data and ap_addr are properly set before marking STA as authenticated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Saru2003,

kernel test robot noticed the following build warnings:

[auto build test WARNING on wireless-next/main]
[also build test WARNING on wireless/main linus/master v6.12-rc6 next-20241107]
[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/Saru2003/Fix-Ensure-auth_data-and-ap_addr-are-properly-set-before-marking-STA-as-authenticated/20241108-103338
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link:    https://lore.kernel.org/r/20241108022828.6571-1-sarvesh20123%40gmail.com
patch subject: [PATCH] Fix: Ensure auth_data and ap_addr are properly set before marking STA as authenticated
config: x86_64-rhel-8.3 (https://download.01.org/0day-ci/archive/20241108/202411081625.6Qy8h3Mu-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241108/202411081625.6Qy8h3Mu-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411081625.6Qy8h3Mu-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   net/mac80211/mlme.c: In function 'ieee80211_mark_sta_auth':
>> net/mac80211/mlme.c:4341:34: warning: the comparison will always evaluate as 'true' for the address of 'ap_addr' will never be NULL [-Waddress]
    4341 |         if (!ifmgd->auth_data || !ifmgd->auth_data->ap_addr) {
         |                                  ^
   In file included from net/mac80211/mlme.c:28:
   net/mac80211/ieee80211_i.h:414:12: note: 'ap_addr' declared here
     414 |         u8 ap_addr[ETH_ALEN] __aligned(2);
         |            ^~~~~~~


vim +4341 net/mac80211/mlme.c

  4334	
  4335	static bool ieee80211_mark_sta_auth(struct ieee80211_sub_if_data *sdata)
  4336	{
  4337		struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
  4338		const u8 *ap_addr;
  4339		struct sta_info *sta;
  4340		
> 4341		if (!ifmgd->auth_data || !ifmgd->auth_data->ap_addr) {
  4342			sdata_info(sdata, "auth_data not set or ap_addr missing\n");
  4343			return false;
  4344		}
  4345	
  4346		ap_addr = ifmgd->auth_data->ap_addr;
  4347	
  4348		lockdep_assert_wiphy(sdata->local->hw.wiphy);
  4349	
  4350		sdata_info(sdata, "authenticated\n");
  4351		ifmgd->auth_data->done = true;
  4352		ifmgd->auth_data->timeout = jiffies + IEEE80211_AUTH_WAIT_ASSOC;
  4353		ifmgd->auth_data->timeout_started = true;
  4354		run_again(sdata, ifmgd->auth_data->timeout);
  4355	
  4356		/* move station state to auth */
  4357		sta = sta_info_get(sdata, ap_addr);
  4358		if (!sta) {
  4359		        sdata_info(sdata, "STA %pM not found, skipping authentication mark\n", ap_addr);
  4360			return false;
  4361		}
  4362		if (sta_info_move_state(sta, IEEE80211_STA_AUTH)) {
  4363			sdata_info(sdata, "failed moving %pM to auth\n", ap_addr);
  4364			return false;
  4365		}
  4366	
  4367		return true;
  4368	}
  4369	

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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux