net/mac80211/tx.c:1060:1: warning: stack frame size of 2096 bytes in function 'ieee80211_tx_h_calculate_duration'

From: kernel test robot
Date: Sun May 02 2021 - 15:55:30 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 17ae69aba89dbfa2139b7f8024b757ab3cc42f59
commit: 89b8c02a35f5c6199f76a839b7a7e450f8185f1b mac80211: don't calculate duration for S1G
date: 7 months ago
config: powerpc64-randconfig-r026-20210430 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8f5a2a5836cc8e4c1def2bdeb022e7b496623439)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=89b8c02a35f5c6199f76a839b7a7e450f8185f1b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 89b8c02a35f5c6199f76a839b7a7e450f8185f1b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

net/mac80211/tx.c:3571:17: warning: stack frame size of 3648 bytes in function 'ieee80211_tx_dequeue' [-Wframe-larger-than=]
struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
^
>> net/mac80211/tx.c:1060:1: warning: stack frame size of 2096 bytes in function 'ieee80211_tx_h_calculate_duration' [-Wframe-larger-than=]
ieee80211_tx_h_calculate_duration(struct ieee80211_tx_data *tx)
^
2 warnings generated.


vim +/ieee80211_tx_h_calculate_duration +1060 net/mac80211/tx.c

e2ebc74d7e3d71 Johannes Berg 2007-07-27 1058
d9e8a70fa20dc3 Johannes Berg 2008-06-30 1059 static ieee80211_tx_result debug_noinline
03f93c3d4c8aa9 Johannes Berg 2008-06-25 @1060 ieee80211_tx_h_calculate_duration(struct ieee80211_tx_data *tx)
03f93c3d4c8aa9 Johannes Berg 2008-06-25 1061 {
252b86c43225d0 Johannes Berg 2011-11-16 1062 struct sk_buff *skb;
2de8e0d999b879 Johannes Berg 2009-03-23 1063 struct ieee80211_hdr *hdr;
2de8e0d999b879 Johannes Berg 2009-03-23 1064 int next_len;
2de8e0d999b879 Johannes Berg 2009-03-23 1065 bool group_addr;
03f93c3d4c8aa9 Johannes Berg 2008-06-25 1066
252b86c43225d0 Johannes Berg 2011-11-16 1067 skb_queue_walk(&tx->skbs, skb) {
2de8e0d999b879 Johannes Berg 2009-03-23 1068 hdr = (void *) skb->data;
7e0aae4732067e Jouni Malinen 2009-05-19 1069 if (unlikely(ieee80211_is_pspoll(hdr->frame_control)))
7e0aae4732067e Jouni Malinen 2009-05-19 1070 break; /* must not overwrite AID */
252b86c43225d0 Johannes Berg 2011-11-16 1071 if (!skb_queue_is_last(&tx->skbs, skb)) {
252b86c43225d0 Johannes Berg 2011-11-16 1072 struct sk_buff *next = skb_queue_next(&tx->skbs, skb);
252b86c43225d0 Johannes Berg 2011-11-16 1073 next_len = next->len;
252b86c43225d0 Johannes Berg 2011-11-16 1074 } else
252b86c43225d0 Johannes Berg 2011-11-16 1075 next_len = 0;
2de8e0d999b879 Johannes Berg 2009-03-23 1076 group_addr = is_multicast_ether_addr(hdr->addr1);
03f93c3d4c8aa9 Johannes Berg 2008-06-25 1077
2de8e0d999b879 Johannes Berg 2009-03-23 1078 hdr->duration_id =
252b86c43225d0 Johannes Berg 2011-11-16 1079 ieee80211_duration(tx, skb, group_addr, next_len);
252b86c43225d0 Johannes Berg 2011-11-16 1080 }
03f93c3d4c8aa9 Johannes Berg 2008-06-25 1081
03f93c3d4c8aa9 Johannes Berg 2008-06-25 1082 return TX_CONTINUE;
03f93c3d4c8aa9 Johannes Berg 2008-06-25 1083 }
03f93c3d4c8aa9 Johannes Berg 2008-06-25 1084

:::::: The code at line 1060 was first introduced by commit
:::::: 03f93c3d4c8aa9ed2e2b0a949ece658053527d71 mac80211: fix tx fragmentation

:::::: TO: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
:::::: CC: John W. Linville <linville@xxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip