[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202105190944.G1pReh8H-lkp@intel.com>
Date: Wed, 19 May 2021 09:02:47 +0800
From: kernel test robot <lkp@...el.com>
To: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Cc: kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
linux-kernel@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>,
David Ahern <dsahern@...nel.org>
Subject: net/wireless/pmsr.c:164:12: warning: stack frame size of 1208 bytes
in function 'pmsr_parse_peer'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ac91e6c6033ebc12c5c1e4aa171b81a662bd70f
commit: 7e3ce05e7f650371061d0b9eec1e1cf74ed6fca0 netlink: add tracepoint at NL_SET_ERR_MSG
date: 3 months ago
config: mips-randconfig-r015-20210519 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8e93d10633d751a3e9169bf9fa68326925ffa097)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7e3ce05e7f650371061d0b9eec1e1cf74ed6fca0
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7e3ce05e7f650371061d0b9eec1e1cf74ed6fca0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> net/wireless/pmsr.c:164:12: warning: stack frame size of 1208 bytes in function 'pmsr_parse_peer' [-Wframe-larger-than=]
static int pmsr_parse_peer(struct cfg80211_registered_device *rdev,
^
1 warning generated.
vim +/pmsr_parse_peer +164 net/wireless/pmsr.c
9bb7e0f24e7e7d Johannes Berg 2018-09-10 163
9bb7e0f24e7e7d Johannes Berg 2018-09-10 @164 static int pmsr_parse_peer(struct cfg80211_registered_device *rdev,
9bb7e0f24e7e7d Johannes Berg 2018-09-10 165 struct nlattr *peer,
9bb7e0f24e7e7d Johannes Berg 2018-09-10 166 struct cfg80211_pmsr_request_peer *out,
9bb7e0f24e7e7d Johannes Berg 2018-09-10 167 struct genl_info *info)
9bb7e0f24e7e7d Johannes Berg 2018-09-10 168 {
9bb7e0f24e7e7d Johannes Berg 2018-09-10 169 struct nlattr *tb[NL80211_PMSR_PEER_ATTR_MAX + 1];
9bb7e0f24e7e7d Johannes Berg 2018-09-10 170 struct nlattr *req[NL80211_PMSR_REQ_ATTR_MAX + 1];
9bb7e0f24e7e7d Johannes Berg 2018-09-10 171 struct nlattr *treq;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 172 int err, rem;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 173
9bb7e0f24e7e7d Johannes Berg 2018-09-10 174 /* no validation needed - was already done via nested policy */
8cb081746c031f Johannes Berg 2019-04-26 175 nla_parse_nested_deprecated(tb, NL80211_PMSR_PEER_ATTR_MAX, peer,
8cb081746c031f Johannes Berg 2019-04-26 176 NULL, NULL);
9bb7e0f24e7e7d Johannes Berg 2018-09-10 177
9bb7e0f24e7e7d Johannes Berg 2018-09-10 178 if (!tb[NL80211_PMSR_PEER_ATTR_ADDR] ||
9bb7e0f24e7e7d Johannes Berg 2018-09-10 179 !tb[NL80211_PMSR_PEER_ATTR_CHAN] ||
9bb7e0f24e7e7d Johannes Berg 2018-09-10 180 !tb[NL80211_PMSR_PEER_ATTR_REQ]) {
9bb7e0f24e7e7d Johannes Berg 2018-09-10 181 NL_SET_ERR_MSG_ATTR(info->extack, peer,
9bb7e0f24e7e7d Johannes Berg 2018-09-10 182 "insufficient peer data");
9bb7e0f24e7e7d Johannes Berg 2018-09-10 183 return -EINVAL;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 184 }
9bb7e0f24e7e7d Johannes Berg 2018-09-10 185
9bb7e0f24e7e7d Johannes Berg 2018-09-10 186 memcpy(out->addr, nla_data(tb[NL80211_PMSR_PEER_ATTR_ADDR]), ETH_ALEN);
9bb7e0f24e7e7d Johannes Berg 2018-09-10 187
9bb7e0f24e7e7d Johannes Berg 2018-09-10 188 /* reuse info->attrs */
9bb7e0f24e7e7d Johannes Berg 2018-09-10 189 memset(info->attrs, 0, sizeof(*info->attrs) * (NL80211_ATTR_MAX + 1));
8cb081746c031f Johannes Berg 2019-04-26 190 err = nla_parse_nested_deprecated(info->attrs, NL80211_ATTR_MAX,
9bb7e0f24e7e7d Johannes Berg 2018-09-10 191 tb[NL80211_PMSR_PEER_ATTR_CHAN],
d15da2a2e81367 Johannes Berg 2020-04-30 192 NULL, info->extack);
9bb7e0f24e7e7d Johannes Berg 2018-09-10 193 if (err)
9bb7e0f24e7e7d Johannes Berg 2018-09-10 194 return err;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 195
9bb7e0f24e7e7d Johannes Berg 2018-09-10 196 err = nl80211_parse_chandef(rdev, info, &out->chandef);
9bb7e0f24e7e7d Johannes Berg 2018-09-10 197 if (err)
9bb7e0f24e7e7d Johannes Berg 2018-09-10 198 return err;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 199
9bb7e0f24e7e7d Johannes Berg 2018-09-10 200 /* no validation needed - was already done via nested policy */
8cb081746c031f Johannes Berg 2019-04-26 201 nla_parse_nested_deprecated(req, NL80211_PMSR_REQ_ATTR_MAX,
8cb081746c031f Johannes Berg 2019-04-26 202 tb[NL80211_PMSR_PEER_ATTR_REQ], NULL,
8cb081746c031f Johannes Berg 2019-04-26 203 NULL);
9bb7e0f24e7e7d Johannes Berg 2018-09-10 204
9bb7e0f24e7e7d Johannes Berg 2018-09-10 205 if (!req[NL80211_PMSR_REQ_ATTR_DATA]) {
9bb7e0f24e7e7d Johannes Berg 2018-09-10 206 NL_SET_ERR_MSG_ATTR(info->extack,
9bb7e0f24e7e7d Johannes Berg 2018-09-10 207 tb[NL80211_PMSR_PEER_ATTR_REQ],
9bb7e0f24e7e7d Johannes Berg 2018-09-10 208 "missing request type/data");
9bb7e0f24e7e7d Johannes Berg 2018-09-10 209 return -EINVAL;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 210 }
9bb7e0f24e7e7d Johannes Berg 2018-09-10 211
9bb7e0f24e7e7d Johannes Berg 2018-09-10 212 if (req[NL80211_PMSR_REQ_ATTR_GET_AP_TSF])
9bb7e0f24e7e7d Johannes Berg 2018-09-10 213 out->report_ap_tsf = true;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 214
9bb7e0f24e7e7d Johannes Berg 2018-09-10 215 if (out->report_ap_tsf && !rdev->wiphy.pmsr_capa->report_ap_tsf) {
9bb7e0f24e7e7d Johannes Berg 2018-09-10 216 NL_SET_ERR_MSG_ATTR(info->extack,
9bb7e0f24e7e7d Johannes Berg 2018-09-10 217 req[NL80211_PMSR_REQ_ATTR_GET_AP_TSF],
9bb7e0f24e7e7d Johannes Berg 2018-09-10 218 "reporting AP TSF is not supported");
9bb7e0f24e7e7d Johannes Berg 2018-09-10 219 return -EINVAL;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 220 }
9bb7e0f24e7e7d Johannes Berg 2018-09-10 221
9bb7e0f24e7e7d Johannes Berg 2018-09-10 222 nla_for_each_nested(treq, req[NL80211_PMSR_REQ_ATTR_DATA], rem) {
9bb7e0f24e7e7d Johannes Berg 2018-09-10 223 switch (nla_type(treq)) {
9bb7e0f24e7e7d Johannes Berg 2018-09-10 224 case NL80211_PMSR_TYPE_FTM:
9bb7e0f24e7e7d Johannes Berg 2018-09-10 225 err = pmsr_parse_ftm(rdev, treq, out, info);
9bb7e0f24e7e7d Johannes Berg 2018-09-10 226 break;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 227 default:
9bb7e0f24e7e7d Johannes Berg 2018-09-10 228 NL_SET_ERR_MSG_ATTR(info->extack, treq,
9bb7e0f24e7e7d Johannes Berg 2018-09-10 229 "unsupported measurement type");
9bb7e0f24e7e7d Johannes Berg 2018-09-10 230 err = -EINVAL;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 231 }
9bb7e0f24e7e7d Johannes Berg 2018-09-10 232 }
9bb7e0f24e7e7d Johannes Berg 2018-09-10 233
9bb7e0f24e7e7d Johannes Berg 2018-09-10 234 if (err)
9bb7e0f24e7e7d Johannes Berg 2018-09-10 235 return err;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 236
9bb7e0f24e7e7d Johannes Berg 2018-09-10 237 return 0;
9bb7e0f24e7e7d Johannes Berg 2018-09-10 238 }
9bb7e0f24e7e7d Johannes Berg 2018-09-10 239
:::::: The code at line 164 was first introduced by commit
:::::: 9bb7e0f24e7e7d00daa1219b14539e2e602649b2 cfg80211: add peer measurement with FTM initiator API
:::::: TO: Johannes Berg <johannes.berg@...el.com>
:::::: CC: Johannes Berg <johannes.berg@...el.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (27463 bytes)
Powered by blists - more mailing lists