diff options
| author | Patrick McHardy <kaber@trash.net> | 2004-11-09 06:01:33 -0800 |
|---|---|---|
| committer | David S. Miller <davem@nuts.davemloft.net> | 2004-11-09 06:01:33 -0800 |
| commit | b4cd3f93e2dec830286af1795a6e73c64ffffb5d (patch) | |
| tree | a030d024047eb9b28d239880b4a1728dc202d437 /include | |
| parent | 3b4b3bfb42039e06aac4972eae9c3fbc46320cc4 (diff) | |
[PKT_SCHED]: Unline inner qdiscs immediately in qdisc_destroy()
Before the RCU change distruction of the qdisc and all inner
qdiscs happend immediately and under the rtnl semaphore. This
made sure nothing holding the rtnl semaphore could end up with
invalid memory. This is not true anymore, inner qdiscs found on
dev->qdisc_list can be suddenly destroyed by the RCU callback.
nothing can find them until they get destroyed.
This also makes semantics sane again, an inner qdiscs should not
be user-visible once the containing qdisc has been destroyed. The
second part (locking in qdisc_lookup) is not really required, but
currently the only purpose of qdisc_tree_lock seems to be to protect
dev->qdisc_list, which is also protected by the rtnl. The rtnl is
especially relied on for making sure nobody frees a qdisc while it
is used in user-context, so qdisc_tree_lock looks unnecessary. I'm
currently reviewing all qdisc locking, if this turns out to be right
I will remove qdisc_tree_lock entirely in a follow-up patch, but for
now I left it in for consistency.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
