stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] rtlwifi: fix uninitialized rtlhal->last_suspend_sec time
@ 2017-11-06 13:55 Arnd Bergmann
  2017-11-06 14:22 ` Larry Finger
  2017-11-08 12:38 ` [1/3] " Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2017-11-06 13:55 UTC (permalink / raw)
  To: Larry Finger, Chaoming Li, Kalle Valo
  Cc: Arnd Bergmann, stable, linux-wireless, netdev, linux-kernel

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 <arnd@arndb.de>
---
 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) {
-- 
2.9.0

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

* Re: [PATCH 1/3] rtlwifi: fix uninitialized rtlhal->last_suspend_sec time
  2017-11-06 13:55 [PATCH 1/3] rtlwifi: fix uninitialized rtlhal->last_suspend_sec time Arnd Bergmann
@ 2017-11-06 14:22 ` Larry Finger
  2017-11-08 12:38 ` [1/3] " Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Larry Finger @ 2017-11-06 14:22 UTC (permalink / raw)
  To: Arnd Bergmann, Chaoming Li, Kalle Valo
  Cc: stable, linux-wireless, netdev, linux-kernel

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: stable@vger.kernel.org
> Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82839
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

For all three of these patches:

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>

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

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

* Re: [1/3] rtlwifi: fix uninitialized rtlhal->last_suspend_sec time
  2017-11-06 13:55 [PATCH 1/3] rtlwifi: fix uninitialized rtlhal->last_suspend_sec time Arnd Bergmann
  2017-11-06 14:22 ` Larry Finger
@ 2017-11-08 12:38 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2017-11-08 12:38 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Larry Finger, Chaoming Li, Arnd Bergmann, stable, linux-wireless,
	netdev, linux-kernel

Arnd Bergmann <arnd@arndb.de> 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: stable@vger.kernel.org
> Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82839
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Acked-by: Larry Finger <Larry.Finger@lwfinger.net>

3 patches applied to wireless-drivers-next.git, thanks.

3f2a162fab15 rtlwifi: fix uninitialized rtlhal->last_suspend_sec time
3c92d5517af8 rtlwifi: use ktime_get_real_seconds() for suspend time
ac978dc79a91 rtlwifi: drop unused ppsc->last_wakeup_time

-- 
https://patchwork.kernel.org/patch/10043505/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

end of thread, other threads:[~2017-11-08 12:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-06 13:55 [PATCH 1/3] rtlwifi: fix uninitialized rtlhal->last_suspend_sec time Arnd Bergmann
2017-11-06 14:22 ` Larry Finger
2017-11-08 12:38 ` [1/3] " Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).