From patchwork Mon Nov 6 13:55:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10043505 X-Patchwork-Delegate: kvalo@adurom.com 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 7689460247 for ; Mon, 6 Nov 2017 13:56:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67CC429C95 for ; Mon, 6 Nov 2017 13:56:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5CA3029C9D; Mon, 6 Nov 2017 13:56:49 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 09DFE29C95 for ; Mon, 6 Nov 2017 13:56:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753280AbdKFN4g (ORCPT ); Mon, 6 Nov 2017 08:56:36 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:64758 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752859AbdKFN4f (ORCPT ); Mon, 6 Nov 2017 08:56:35 -0500 Received: from wuerfel.lan ([109.193.157.232]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0ML81x-1eBz0A1aUr-000Lbq; Mon, 06 Nov 2017 14:56:23 +0100 From: Arnd Bergmann To: Larry Finger , Chaoming Li , Kalle Valo Cc: Arnd Bergmann , stable@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] rtlwifi: fix uninitialized rtlhal->last_suspend_sec time Date: Mon, 6 Nov 2017 14:55:35 +0100 Message-Id: <20171106135619.1248453-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:aP6uiO1yp6DrgXYBztiOq1sOy5iRD4x14VRqlJZ1804TcbyvJnb sW4v5eozfeuhvmEuzgEi3wTQJaNBIOc264oFiX9PkqWkkQogxuPWUBqfNEMPqaxSBHTeebx wzU50U7nQLLbSWxvOnEvd6CfchRJf3btRGGWg7o6iWOgUIWOSH19N2ZBAwYC/8kK4lev0IP E01upb1UoY2VaXSft41JA== X-UI-Out-Filterresults: notjunk:1; V01:K0:J27OkW/uTvI=:zhWDkt8pyX0rS9vZemloKA P3K1d3DeHrmU7VwVJjPbJAgCtgmFP0CHLaOE4M0p7L40gkbT+pgA1bkp3/lw1Zp7Klfbhfzec WoSPf/8nSNPhO04jMnHEnelF9G2lAepjqyTJuksYCLCHu2dHt7DHJSG73TPLRzpOhWcYOVw0a Pbp/Psawp44vMK6H3G7+YIFqPSlJdnLODI4vlXs1WMabHEDdeBxiiz3mbL7I5fzDDIq5vm+t/ W77+0EWxplCctijZLa14WM6eW3gMZkzSsB3U3JbSR5MR90j4lvJt0KHHTqG/tRXDjR516PlyR GX8bSlTnuUEsUNEpxfoTaKyTO+RLDCtuA2WiGMJkoOF8YdXkPMN+rXVUopXuuAcY3WFPzfocx 3hvJ49MkiE1edaSvMWOwiEJ/QH0NAaA+NXv0303de1Ty8ROMO8tsU+0bqhPSzaIH/1POMEtZb jGL0MjexKdsfNL+za5s8NX1iU7q7T6QG6WZoQJeizMYZFlYuB5MrCwheKi7bnYm/QwgtwxpYa hFJWJCSaIjh1OYR1JV3eUnTEvQu2DsDSMyjB28jLF/HubOSs6dIs1PBRYZXkcCbfxt79kC79n p8GnMeOjEflGt6pKRLKUuwOdq2G3+N2DJpa+f0NC4V10VYcksP8JPHRcldrpdpQEcaquN+GoA GI1oLFtFSZ5/8D4X1Rk+E5aHt+3ehbfiFab31sysQhdAIkMAhG9Zk3XPku7dnBCROwI0/l2Xv FSuwrXIdhZHAIRIyqsMbjKYxAD5GMyfpeBJHzA== Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We set rtlhal->last_suspend_sec to an uninitialized stack variable, but unfortunately gcc never warned about this, I only found it while working on another patch. I opened a gcc bug for this. Presumably the value of rtlhal->last_suspend_sec is not all that important, but it does get used, so we probably want the patch backported to stable kernels. Cc: stable@vger.kernel.org Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82839 Signed-off-by: Arnd Bergmann Acked-by: Larry Finger --- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c index 60c82a5b51cd..20ffe856180e 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c @@ -1373,6 +1373,7 @@ static void _rtl8821ae_get_wakeup_reason(struct ieee80211_hw *hw) ppsc->wakeup_reason = 0; + do_gettimeofday(&ts); rtlhal->last_suspend_sec = ts.tv_sec; switch (fw_reason) {