netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][NET_SCHED] sch_sfq: use del_timer_sync() in sfq_destroy()
@ 2008-04-27 12:59 Jarek Poplawski
  2008-04-27 18:24 ` Patrick McHardy
  2008-04-29 10:29 ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Jarek Poplawski @ 2008-04-27 12:59 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

[NET_SCHED] sch_sfq: use del_timer_sync() in sfq_destroy()

Let's delete timer reliably in sfq_destroy().


Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>

---

 net/sched/sch_sfq.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index a20e2ef..f0463d7 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -521,7 +521,8 @@ static void sfq_destroy(struct Qdisc *sch)
 	struct sfq_sched_data *q = qdisc_priv(sch);
 
 	tcf_destroy_chain(q->filter_list);
-	del_timer(&q->perturb_timer);
+	q->perturb_period = 0;
+	del_timer_sync(&q->perturb_timer);
 }
 
 static int sfq_dump(struct Qdisc *sch, struct sk_buff *skb)

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

* Re: [PATCH][NET_SCHED] sch_sfq: use del_timer_sync() in sfq_destroy()
  2008-04-27 12:59 [PATCH][NET_SCHED] sch_sfq: use del_timer_sync() in sfq_destroy() Jarek Poplawski
@ 2008-04-27 18:24 ` Patrick McHardy
  2008-04-27 19:00   ` Jarek Poplawski
  2008-04-29 10:29 ` David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Patrick McHardy @ 2008-04-27 18:24 UTC (permalink / raw)
  To: Jarek Poplawski; +Cc: David Miller, netdev

Jarek Poplawski wrote:
> [NET_SCHED] sch_sfq: use del_timer_sync() in sfq_destroy()
>
> Let's delete timer reliably in sfq_destroy().

This is broken, we hold dev->queue_lock in ->destroy.


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

* Re: [PATCH][NET_SCHED] sch_sfq: use del_timer_sync() in sfq_destroy()
  2008-04-27 18:24 ` Patrick McHardy
@ 2008-04-27 19:00   ` Jarek Poplawski
  2008-04-27 19:10     ` Patrick McHardy
  0 siblings, 1 reply; 5+ messages in thread
From: Jarek Poplawski @ 2008-04-27 19:00 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: David Miller, netdev

On Sun, Apr 27, 2008 at 08:24:34PM +0200, Patrick McHardy wrote:
> Jarek Poplawski wrote:
>> [NET_SCHED] sch_sfq: use del_timer_sync() in sfq_destroy()
>>
>> Let's delete timer reliably in sfq_destroy().
>
> This is broken, we hold dev->queue_lock in ->destroy.
>

But sfq timer (sfq_perturbation()) doesn't use this timer...
Could you explain your point more?

Thanks,
Jarek P.

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

* Re: [PATCH][NET_SCHED] sch_sfq: use del_timer_sync() in sfq_destroy()
  2008-04-27 19:00   ` Jarek Poplawski
@ 2008-04-27 19:10     ` Patrick McHardy
  0 siblings, 0 replies; 5+ messages in thread
From: Patrick McHardy @ 2008-04-27 19:10 UTC (permalink / raw)
  To: Jarek Poplawski; +Cc: David Miller, netdev

Jarek Poplawski wrote:
> On Sun, Apr 27, 2008 at 08:24:34PM +0200, Patrick McHardy wrote:
>   
>> Jarek Poplawski wrote:
>>     
>>> [NET_SCHED] sch_sfq: use del_timer_sync() in sfq_destroy()
>>>
>>> Let's delete timer reliably in sfq_destroy().
>>>       
>> This is broken, we hold dev->queue_lock in ->destroy.
>>
>>     
>
> But sfq timer (sfq_perturbation()) doesn't use this timer...
> Could you explain your point more?
My point was that it might sleep and can thus not be called
in atomic context. This was a misunderstanding on my side
though and your patch is fine.



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

* Re: [PATCH][NET_SCHED] sch_sfq: use del_timer_sync() in sfq_destroy()
  2008-04-27 12:59 [PATCH][NET_SCHED] sch_sfq: use del_timer_sync() in sfq_destroy() Jarek Poplawski
  2008-04-27 18:24 ` Patrick McHardy
@ 2008-04-29 10:29 ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2008-04-29 10:29 UTC (permalink / raw)
  To: jarkao2; +Cc: netdev

From: Jarek Poplawski <jarkao2@gmail.com>
Date: Sun, 27 Apr 2008 14:59:21 +0200

> [NET_SCHED] sch_sfq: use del_timer_sync() in sfq_destroy()
> 
> Let's delete timer reliably in sfq_destroy().
> 
> 
> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>

Applied, thanks.

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

end of thread, other threads:[~2008-04-29 10:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-27 12:59 [PATCH][NET_SCHED] sch_sfq: use del_timer_sync() in sfq_destroy() Jarek Poplawski
2008-04-27 18:24 ` Patrick McHardy
2008-04-27 19:00   ` Jarek Poplawski
2008-04-27 19:10     ` Patrick McHardy
2008-04-29 10:29 ` David Miller

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