netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: r8712u: Fix kernel warning for improper call of del_timer_sync()
@ 2015-05-23 21:16 Larry Finger
  2015-05-24 19:03 ` Haggai Eran
  2015-05-25 16:02 ` Larry Finger
  0 siblings, 2 replies; 27+ messages in thread
From: Larry Finger @ 2015-05-23 21:16 UTC (permalink / raw)
  To: gregkh; +Cc: netdev, devel, Larry Finger, linux-wireless, Stable, Haggi Eran

The driver is reporting a warning at kernel/time/timer.c:1096 due to calling
del_timer_sync() while in interrupt mode. Such warnings are fixed by calling
del_timer() instead.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Cc: Haggi Eran <haggai.eran@gmail.com>
---
 drivers/staging/rtl8712/rtl8712_led.c  | 2 +-
 drivers/staging/rtl8712/rtl871x_mlme.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_led.c b/drivers/staging/rtl8712/rtl8712_led.c
index f1d47a0..8cc716c 100644
--- a/drivers/staging/rtl8712/rtl8712_led.c
+++ b/drivers/staging/rtl8712/rtl8712_led.c
@@ -921,7 +921,7 @@ static void SwLedControlMode1(struct _adapter *padapter,
 			    IS_LED_WPS_BLINKING(pLed))
 				return;
 			if (pLed->bLedNoLinkBlinkInProgress == true) {
-				del_timer_sync(&pLed->BlinkTimer);
+				del_timer(&pLed->BlinkTimer);
 				pLed->bLedNoLinkBlinkInProgress = false;
 			}
 			if (pLed->bLedBlinkInProgress == true) {
diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c
index fb2b195..ace88ab 100644
--- a/drivers/staging/rtl8712/rtl871x_mlme.c
+++ b/drivers/staging/rtl8712/rtl871x_mlme.c
@@ -582,7 +582,7 @@ void r8712_surveydone_event_callback(struct _adapter *adapter, u8 *pbuf)
 	spin_lock_irqsave(&pmlmepriv->lock, irqL);
 
 	if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
-		del_timer_sync(&pmlmepriv->scan_to_timer);
+		del_timer(&pmlmepriv->scan_to_timer);
 
 		_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY);
 	}
@@ -910,7 +910,7 @@ void r8712_joinbss_event_callback(struct _adapter *adapter, u8 *pbuf)
 			if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)
 				== true)
 				r8712_indicate_connect(adapter);
-			del_timer_sync(&pmlmepriv->assoc_timer);
+			del_timer(&pmlmepriv->assoc_timer);
 		} else
 			goto ignore_joinbss_callback;
 	} else {
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread
* Re: [PATCH] staging: r8712u: Fix kernel warning for improper call of del_timer_sync()
@ 2015-05-25  4:42 Sudip Mukherjee
  2015-05-25 15:59 ` Larry Finger
  0 siblings, 1 reply; 27+ messages in thread
From: Sudip Mukherjee @ 2015-05-25  4:42 UTC (permalink / raw)
  To: haggai.eran
  Cc: gregkh, netdev, devel, linux-wireless, Stable, Arek Rusniak,
	Larry Finger

>I haven't been using kernel v4.1 so I haven't seen this warning, but looking
>at the code it seems to originate from the two recent patches to remove
>_cancel_timer and _cancel_timer_ex. I see that there's another patch in lkml [1]
>that changes del_timer_sync back to del_timer in more places. Perhaps it
>could prevent other warnings like this in the future.

_cancel_timer and _cancel_timer_ex both were internally using del_timer,
and the issue was reported in bugzilla. I have given the reference of the
bugzilla in my patch in lkml.
I have changed the reference of del_timer_sync to del_timer in all places
which were in interrupt context, in some places it was not removed as
those were not in interrupt context.

regards
sudip

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

end of thread, other threads:[~2015-05-31  2:54 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-23 21:16 [PATCH] staging: r8712u: Fix kernel warning for improper call of del_timer_sync() Larry Finger
2015-05-24 19:03 ` Haggai Eran
2015-05-25  0:11   ` Larry Finger
2015-05-25  9:17     ` Dan Carpenter
     [not found]       ` <CAK-LDb+1WscLTFw=NDY=_aUOGw72a4wRsqCU-1N+KJ11k15S5w@mail.gmail.com>
2015-05-25 10:12         ` Dan Carpenter
2015-05-25 15:52         ` Larry Finger
2015-05-25 17:37       ` Joe Perches
2015-05-26  4:46         ` Sudip Mukherjee
2015-05-26  4:55           ` Joe Perches
2015-05-26  5:02             ` Sudip Mukherjee
2015-05-26  5:07               ` Joe Perches
2015-05-26  5:30                 ` Sudip Mukherjee
2015-05-26 15:31                   ` Larry Finger
2015-05-26 14:14                 ` Greg KH
2015-05-26 14:48                   ` Joe Perches
2015-05-26 16:35                     ` Greg KH
2015-05-26 17:06                       ` Joe Perches
2015-05-26 20:25                         ` Dan Carpenter
2015-05-26 20:30                         ` Greg KH
2015-05-26 20:09                       ` Dan Carpenter
2015-05-26 15:48                   ` Dan Carpenter
2015-05-26 16:40                     ` Larry Finger
2015-05-25 16:02 ` Larry Finger
2015-05-31  2:53   ` Greg KH
     [not found]     ` <20150531025347.GA8074-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2015-05-31  2:54       ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2015-05-25  4:42 Sudip Mukherjee
2015-05-25 15:59 ` Larry Finger

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