All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers: net: wireless: ath: ath9: dfs: remove VLA usage
@ 2018-03-09 12:30 Andreas Christoforou
  2018-03-09 12:51 ` Himanshu Jha
  2018-03-10 23:06 ` Arend van Spriel
  0 siblings, 2 replies; 14+ messages in thread
From: Andreas Christoforou @ 2018-03-09 12:30 UTC (permalink / raw)
  To: keescook
  Cc: kernel-hardening, Andreas Christoforou, QCA ath9k Development,
	Kalle Valo, linux-wireless, netdev, linux-kernel

The kernel would like to have all stack VLA usage removed.

Signed-off-by: Andreas Christoforou <andreaschristofo@gmail.com>
---
 drivers/net/wireless/ath/ath9k/dfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/dfs.c b/drivers/net/wireless/ath/ath9k/dfs.c
index 6fee9a4..cfb0f84 100644
--- a/drivers/net/wireless/ath/ath9k/dfs.c
+++ b/drivers/net/wireless/ath/ath9k/dfs.c
@@ -41,7 +41,6 @@ static const int BIN_DELTA_MAX		= 10;
 
 /* we need at least 3 deltas / 4 samples for a reliable chirp detection */
 #define NUM_DIFFS 3
-static const int FFT_NUM_SAMPLES	= (NUM_DIFFS + 1);
 
 /* Threshold for difference of delta peaks */
 static const int MAX_DIFF		= 2;
@@ -101,7 +100,7 @@ static bool ath9k_check_chirping(struct ath_softc *sc, u8 *data,
 				 int datalen, bool is_ctl, bool is_ext)
 {
 	int i;
-	int max_bin[FFT_NUM_SAMPLES];
+	int max_bin[NUM_DIFFS + 1];
 	struct ath_hw *ah = sc->sc_ah;
 	struct ath_common *common = ath9k_hw_common(ah);
 	int prev_delta;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-03-14  1:39 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-09 12:30 [PATCH] drivers: net: wireless: ath: ath9: dfs: remove VLA usage Andreas Christoforou
2018-03-09 12:51 ` Himanshu Jha
2018-03-09 14:48   ` Kalle Valo
2018-03-09 14:48     ` Kalle Valo
2018-03-10 23:06 ` Arend van Spriel
2018-03-10 23:12   ` Kees Cook
2018-03-10 23:26     ` Gustavo A. R. Silva
2018-03-14  1:38     ` Miguel Ojeda
2018-03-14  1:38       ` Miguel Ojeda
2018-03-10 23:44   ` Daniel Micay
2018-03-13 12:32     ` David Laight
2018-03-13 12:32       ` David Laight
2018-03-14  1:18       ` Daniel Micay
2018-03-14  1:22         ` Daniel Micay

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.