diff options
author | Johannes Berg <johannes.berg@intel.com> | 2024-03-25 17:05:03 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-03-25 17:40:03 +0300 |
commit | f40db02e8fa357196d57e002cc1e74abe8b8009d (patch) | |
tree | 2feb3c1dd1db83bed33a8c38205affa13e43c808 /net/mac80211 | |
parent | 96833fb3c7abfd57bb3ee2de2534c5a3f52b0838 (diff) | |
download | linux-f40db02e8fa357196d57e002cc1e74abe8b8009d.tar.xz |
wifi: mac80211: use kvcalloc() for codel vars
This is a big array, but it's only used by software and
need not be contiguous in memory. Use kvcalloc() since
it's so big (order 5 allocation).
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240325150509.9195643699e4.I1b94b17abc809491080d6312f31ce6b5decdd446@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/tx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 6bf223e6cd1a..ac5ae7c05e36 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1604,8 +1604,8 @@ int ieee80211_txq_setup_flows(struct ieee80211_local *local) local->cparams.target = MS2TIME(20); local->cparams.ecn = true; - local->cvars = kcalloc(fq->flows_cnt, sizeof(local->cvars[0]), - GFP_KERNEL); + local->cvars = kvcalloc(fq->flows_cnt, sizeof(local->cvars[0]), + GFP_KERNEL); if (!local->cvars) { spin_lock_bh(&fq->lock); fq_reset(fq, fq_skb_free_func); @@ -1625,7 +1625,7 @@ void ieee80211_txq_teardown_flows(struct ieee80211_local *local) { struct fq *fq = &local->fq; - kfree(local->cvars); + kvfree(local->cvars); local->cvars = NULL; spin_lock_bh(&fq->lock); |