From patchwork Fri Mar 9 12:30:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Christoforou X-Patchwork-Id: 10270533 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 454FE60594 for ; Fri, 9 Mar 2018 12:38:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 472B528C6D for ; Fri, 9 Mar 2018 12:38:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B7B829DB5; Fri, 9 Mar 2018 12:38:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id 68B6828C6D for ; Fri, 9 Mar 2018 12:38:55 +0000 (UTC) Received: (qmail 5952 invoked by uid 550); 9 Mar 2018 12:38:53 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Delivered-To: moderator for kernel-hardening@lists.openwall.com Received: (qmail 31951 invoked from network); 9 Mar 2018 12:30:56 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=xtiuWI9Z0HSwYgxn85GAlokiz4gHR8q1NAKsDgqQoD4=; b=tEASLpdPisqd7PXpU2eMfBNwS9nfLuklo88BNOIdpdatu3ZhwbV+LCUiT1/vxWfchw Kkck3KOyI6hTKiP4IcrP9aQhoTzbnbcm19QkQ0MI1lM7ywoSF1LtCfaeq/QBBQ3XOfW2 KQYT88Edk/9dBKVl4OuXNANLe79/yjVARFRJ9RrgD0PyLFwFk8J1Xe0J70KAN7LhRiJp WuWato4WtHe8vvlXAdI3k9M6b5v5xoqjKHaPKR8FuMr7hNpSu/choScpBqHHlOYD7s/h qh2uH98vhPTFhLMu466ARkC2FjR1GCbkDcKnRvmf6aE+kLHtLB2eRLhhSjT1Tx9r207Z AeDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xtiuWI9Z0HSwYgxn85GAlokiz4gHR8q1NAKsDgqQoD4=; b=oQR4Tqc+Acqqoj1CqQta78TIM2JuYHQrOoH4RDSYB7KNqeEdyw2eyPnAH9oKepLS2Q 0YwmG/5MdeRwqSGdLJB/nC3UxU2nTmTkfoD8XbHAEw+56aA5NWwDdLT1Hvx19c2bJ1ho K7oyMZ5/ut88CWQf0Czup72oVyYdlErFY0UUw6dNY6itHEWegvVkWirEp2GjWWXRzyoX WFCh2HeQETiaWJZXEtE2KuRSOewAALQXCTnQWfgJXchnM8HZ0S8NHrkeiDL6CrH6Zzdk R9CWI8R8poFhIKDaBrRF2VkglR5zWrZaeqsd3okim6bJzJxIDHJ3xS4gyXKQ030Gx4fN yadg== X-Gm-Message-State: APf1xPDKaCyM48Q9LhPRcfwkoQ9nSN8GKjEEXeXx+wj2R6KuQgR2HHdq DaqsQtGkB9zD2sD9Yv0ee/I= X-Google-Smtp-Source: AG47ELvIqUxdOd38wyVavDfaDObbrDRka03P7c9nGXU94wmdrMhrQbfGUKYePRMzFXNpQPC/Y1U7eg== X-Received: by 10.223.159.79 with SMTP id f15mr26930152wrg.115.1520598644991; Fri, 09 Mar 2018 04:30:44 -0800 (PST) From: Andreas Christoforou To: keescook@chromium.org Cc: kernel-hardening@lists.openwall.com, Andreas Christoforou , QCA ath9k Development , Kalle Valo , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] drivers: net: wireless: ath: ath9: dfs: remove VLA usage Date: Fri, 9 Mar 2018 14:30:12 +0200 Message-Id: <1520598613-3641-1-git-send-email-andreaschristofo@gmail.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP The kernel would like to have all stack VLA usage removed. Signed-off-by: Andreas Christoforou --- 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;