2017-11-06 14:24:05

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH 1/3] rtlwifi: fix uninitialized rtlhal->last_suspend_sec time

On 11/06/2017 07:55 AM, Arnd Bergmann wrote:
> 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: [email protected]
> Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82839
> Signed-off-by: Arnd Bergmann <[email protected]>

For all three of these patches:

Acked-by: Larry Finger <[email protected]>

Thanks,

Larry

> ---
> 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) {
>


From 1583325281359154051@xxx Mon Nov 06 13:57:35 +0000 2017
X-GM-THRID: 1583325281359154051
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread