netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Saru2003 <sarvesh20123@gmail.com>, johannes@sipsolutions.net
Cc: oe-kbuild-all@lists.linux.dev, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, Saru2003 <sarvesh20123@gmail.com>
Subject: Re: [PATCH] Fix: Ensure auth_data and ap_addr are properly set before marking STA as authenticated
Date: Fri, 8 Nov 2024 17:10:05 +0800	[thread overview]
Message-ID: <202411081625.6Qy8h3Mu-lkp@intel.com> (raw)
In-Reply-To: <20241108022828.6571-1-sarvesh20123@gmail.com>

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@intel.com/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@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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411081625.6Qy8h3Mu-lkp@intel.com/

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

      parent reply	other threads:[~2024-11-08  9:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08  2:28 [PATCH] Fix: Ensure auth_data and ap_addr are properly set before marking STA as authenticated Saru2003
2024-11-08  7:45 ` Johannes Berg
2024-11-08  9:10 ` kernel test robot
2024-11-08  9:10 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202411081625.6Qy8h3Mu-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=sarvesh20123@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).