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: 118051 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2792121qgn; Mon, 6 Nov 2017 05:56:39 -0800 (PST) X-Google-Smtp-Source: ABhQp+SBKVYxdsn6HX1Rd9WfMGGd0xKKhzswKs3/gbUCwMAVw1ekqF7CmW0qPCRdO8BlBabCOR6h X-Received: by 10.99.95.86 with SMTP id t83mr15256177pgb.34.1509976598933; Mon, 06 Nov 2017 05:56:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509976598; cv=none; d=google.com; s=arc-20160816; b=bN2c0pzp3je6CKHsCcIKS7tNq3k7EahsYO5nN/HOv3YzCPjI5M6uJylVx3ciSVDdVf slqov0VsMU4mnN/sVA1p/PqQ6fAMEJdSaD1D5yHQlaMgWeVbWP39fr/KG1ZI1CuTUi5+ JdCLNf42z/tc8rlzG6LKSvzmic9lAwCc4OYJWn5g1OhA5PbChVdEFNHUNcG5H/ftcdVk 3Yk8ktlKROgn1n53NKxlQ0T4wmjiJUDvzNPrXyMXfRdtGlt9VskNMqr3ZU96ZxrIUxR+ 9xJAyUnTlXVTVSS8mzY8KTO5pq0ZX1tFTLQzfq26DC0PrDk2bS05uiB5rWiR9XyUoRFD aPvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=EiSUVmYa1CvhBrlokc6Hv66Xcln/Do0oT1bLzMTGeMs=; b=GEO+LhnUOCyuBTKdzxa3q1H4laJJzLw7dUKWp+mTiyfPTqmVF5dJkFdesH3uaT8U6u GcxfjpIp34JXlxiYvvOaiHbQgoyGetUQae2N+tuxdyfl51COdzHs1KAWldMmxi9lnOI7 Z08jjagb1n58yPxE+bRofyvNF/aUMWHuLEB3KBKOPbwDD+7BmPB6hHk4V3/6gAG/KfJr TlX82Lfr5Q5CX3zaF8uqLiDKSsSEtcUh3wA3dLPxPGqrLlqezaSgaAoYv1MWuaYbxGhB Ys4Ym6P/feF91Wl87lI1D3LOcIjH4xmP1EWn4A4QST8fq+Iin5APJjKGCRI2lpFBh42A WY0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si9648164plo.514.2017.11.06.05.56.38; Mon, 06 Nov 2017 05:56:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753336AbdKFN4h (ORCPT + 26 others); Mon, 6 Nov 2017 08:56:37 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 1 + 1 file changed, 1 insertion(+) -- 2.9.0 Acked-by: Larry Finger 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) {