netdev
[Top] [All Lists]

Re: [PATCH 2.6 1/5]: Fix locking in __qdisc_destroy rcu-callback

To: Patrick McHardy <kaber@xxxxxxxxx>
Subject: Re: [PATCH 2.6 1/5]: Fix locking in __qdisc_destroy rcu-callback
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Wed, 4 Aug 2004 09:33:28 -0700
Cc: netdev@xxxxxxxxxxx
In-reply-to: <410FAD44.7020503@xxxxxxxxx>
References: <410FAD44.7020503@xxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Tue, 03 Aug 2004 17:20:36 +0200
Patrick McHardy <kaber@xxxxxxxxx> wrote:

> The __qdisc_destroy rcu-callback doesn't do any locking when calling
> ops->reset and ops->destroy. qdisc_destroy is often called from both
> of these functions and it changes dev->qdisc_list. This patch adds proper
> locking to __qdisc_destroy. Unfortunately when using qdisc_tree_lock in
> process context we now also need to disable local bh's to avoid beeing
> interrupted by the rcu-callback. I'm not sure if RCU callback can be
> scheduled while the kernel is running in process context, so this may
> be unneccessary.

RCU callbacks run via tasklets, and thus in softirq context,
thus your locking changes to _bh() are indeed necessary.

I will apply this patch, thanks Patrick.


<Prev in Thread] Current Thread [Next in Thread>