This is a note to let you know that I've just added the patch titled
can: c_can: fix race condition in c_can_open()
to the 3.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
can-c_can-fix-race-condition-in-c_can_open.patch
and it can be found in the queue-3.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From f461f27a4436dbe691908fe08b867ef888848cc3 Mon Sep 17 00:00:00 2001
From: AnilKumar Ch <[email protected]>
Date: Wed, 23 May 2012 17:45:11 +0530
Subject: can: c_can: fix race condition in c_can_open()
From: AnilKumar Ch <[email protected]>
commit f461f27a4436dbe691908fe08b867ef888848cc3 upstream.
Fix the issue of C_CAN interrupts getting disabled forever when canconfig
utility is used multiple times. According to NAPI usage we disable all
the hardware interrupts in ISR and re-enable them in poll(). Current
implementation calls napi_enable() after hardware interrupts are enabled.
If we get any interrupts between these two steps then we do not process
those interrupts because napi is not enabled. Mostly these interrupts
come because of STATUS is not 0x7 or ERROR interrupts. If napi_enable()
happens before HW interrupts enabled then c_can_poll() function will be
called eventual re-enabling.
This patch moves the napi_enable() call before interrupts enabled.
Signed-off-by: AnilKumar Ch <[email protected]>
Acked-by: Wolfgang Grandegger <[email protected]>
Signed-off-by: Marc Kleine-Budde <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/net/can/c_can/c_can.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/net/can/c_can/c_can.c
+++ b/drivers/net/can/c_can/c_can.c
@@ -1064,10 +1064,11 @@ static int c_can_open(struct net_device
goto exit_irq_fail;
}
+ napi_enable(&priv->napi);
+
/* start the c_can controller */
c_can_start(dev);
- napi_enable(&priv->napi);
netif_start_queue(dev);
return 0;
Patches currently in stable-queue which might be from [email protected] are
queue-3.4/can-c_can-fix-bug-echo_skb-is-occupied-during-transmit.patch
queue-3.4/can-c_can-fix-race-condition-in-c_can_open.patch
queue-3.4/can-c_can-fix-an-interrupt-thrash-issue-with-c_can-driver.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html