* [PATCH] WAN: flush tx_queue in hdlc_ppp to prevent panic on rmmod hw_driver.
@ 2010-04-15 0:09 Krzysztof Halasa
2010-04-16 22:41 ` David Miller
2010-04-22 19:17 ` Michael Barkowski
0 siblings, 2 replies; 5+ messages in thread
From: Krzysztof Halasa @ 2010-04-15 0:09 UTC (permalink / raw)
To: David Miller; +Cc: netdev
tx_queue is used as a temporary queue when not allowed to queue skb
directly to the hw device driver (which may sleep). Most paths flush
it before returning, but ppp_start() currently cannot. Make sure we
don't leave skbs pointing to a non-existent device.
Thanks to Michael Barkowski for reporting this problem.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
diff --git a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c
index b9b9d6b..941f053 100644
--- a/drivers/net/wan/hdlc_ppp.c
+++ b/drivers/net/wan/hdlc_ppp.c
@@ -628,9 +628,15 @@ static void ppp_stop(struct net_device *dev)
ppp_cp_event(dev, PID_LCP, STOP, 0, 0, 0, NULL);
}
+static void ppp_close(struct net_device *dev)
+{
+ ppp_tx_flush();
+}
+
static struct hdlc_proto proto = {
.start = ppp_start,
.stop = ppp_stop,
+ .close = ppp_close,
.type_trans = ppp_type_trans,
.ioctl = ppp_ioctl,
.netif_rx = ppp_rx,
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] WAN: flush tx_queue in hdlc_ppp to prevent panic on rmmod hw_driver.
2010-04-15 0:09 [PATCH] WAN: flush tx_queue in hdlc_ppp to prevent panic on rmmod hw_driver Krzysztof Halasa
@ 2010-04-16 22:41 ` David Miller
2010-04-22 19:17 ` Michael Barkowski
1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2010-04-16 22:41 UTC (permalink / raw)
To: khc; +Cc: netdev
From: Krzysztof Halasa <khc@pm.waw.pl>
Date: Thu, 15 Apr 2010 02:09:52 +0200
> tx_queue is used as a temporary queue when not allowed to queue skb
> directly to the hw device driver (which may sleep). Most paths flush
> it before returning, but ppp_start() currently cannot. Make sure we
> don't leave skbs pointing to a non-existent device.
>
> Thanks to Michael Barkowski for reporting this problem.
>
> Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Applied, thank you.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] WAN: flush tx_queue in hdlc_ppp to prevent panic on rmmod hw_driver.
2010-04-15 0:09 [PATCH] WAN: flush tx_queue in hdlc_ppp to prevent panic on rmmod hw_driver Krzysztof Halasa
2010-04-16 22:41 ` David Miller
@ 2010-04-22 19:17 ` Michael Barkowski
2010-04-22 21:43 ` David Miller
1 sibling, 1 reply; 5+ messages in thread
From: Michael Barkowski @ 2010-04-22 19:17 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: David Miller, netdev
Krzysztof Halasa wrote:
> tx_queue is used as a temporary queue when not allowed to queue skb
> directly to the hw device driver (which may sleep). Most paths flush
> it before returning, but ppp_start() currently cannot. Make sure we
> don't leave skbs pointing to a non-existent device.
>
> Thanks to Michael Barkowski for reporting this problem.
Great - thanks. Will this be going into -stable?
--
Michael Barkowski
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] WAN: flush tx_queue in hdlc_ppp to prevent panic on rmmod hw_driver.
2010-04-22 19:17 ` Michael Barkowski
@ 2010-04-22 21:43 ` David Miller
2010-04-22 21:55 ` Michael Barkowski
0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2010-04-22 21:43 UTC (permalink / raw)
To: michaelbarkowski; +Cc: khc, netdev
From: Michael Barkowski <michaelbarkowski@ruggedcom.com>
Date: Thu, 22 Apr 2010 15:17:13 -0400
> Krzysztof Halasa wrote:
>> tx_queue is used as a temporary queue when not allowed to queue skb
>> directly to the hw device driver (which may sleep). Most paths flush
>> it before returning, but ppp_start() currently cannot. Make sure we
>> don't leave skbs pointing to a non-existent device.
>>
>> Thanks to Michael Barkowski for reporting this problem.
>
> Great - thanks. Will this be going into -stable?
When I think it's cooked long enough in Linus's tree and
I submit it there. That can take a few weeks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] WAN: flush tx_queue in hdlc_ppp to prevent panic on rmmod hw_driver.
2010-04-22 21:43 ` David Miller
@ 2010-04-22 21:55 ` Michael Barkowski
0 siblings, 0 replies; 5+ messages in thread
From: Michael Barkowski @ 2010-04-22 21:55 UTC (permalink / raw)
To: David Miller; +Cc: khc, netdev
David Miller wrote:
> From: Michael Barkowski <michaelbarkowski@ruggedcom.com>
> Date: Thu, 22 Apr 2010 15:17:13 -0400
>
>> Krzysztof Halasa wrote:
>>> tx_queue is used as a temporary queue when not allowed to queue skb
>>> directly to the hw device driver (which may sleep). Most paths flush
>>> it before returning, but ppp_start() currently cannot. Make sure we
>>> don't leave skbs pointing to a non-existent device.
>>>
>>> Thanks to Michael Barkowski for reporting this problem.
>> Great - thanks. Will this be going into -stable?
>
> When I think it's cooked long enough in Linus's tree and
> I submit it there. That can take a few weeks.
>
Super. By the way, should have mentioned - tested and works for me
--
Michael Barkowski
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-04-22 21:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-15 0:09 [PATCH] WAN: flush tx_queue in hdlc_ppp to prevent panic on rmmod hw_driver Krzysztof Halasa
2010-04-16 22:41 ` David Miller
2010-04-22 19:17 ` Michael Barkowski
2010-04-22 21:43 ` David Miller
2010-04-22 21:55 ` Michael Barkowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.