* BUG: atomic counter underflow when running "rmmod tg3" on 2.6.10-rc1-mm3
@ 2004-11-09 2:33 Bernhard Rosenkraenzer
2004-11-09 5:18 ` David S. Miller
2004-11-09 5:55 ` Patrick McHardy
0 siblings, 2 replies; 3+ messages in thread
From: Bernhard Rosenkraenzer @ 2004-11-09 2:33 UTC (permalink / raw)
To: linux-kernel
BUG: atomic counter underflow at:
[<c02882f6>] qdisc_destroy+0x66/0x80
[<c02885e2>] dev_shutdown+0x32/0x90
[<c02d796f>] __down_failed_trylock+0x7/0xc
[<c027b6b2>] unregister_netdevice+0x142/0x29e
[<c014c171>] handle_mm_fault+0xf1/0x510
[<c0240a95>] unregister_netdev+0x15/0x20
[<e0d3a2b5>] tg3_remove_one+0x25/0x70 [tg3]
[<c01db4e9>] pci_device_remove+0x69/0x70
[<c0232646>] device_release_driver+0x86/0x90
[<c0232a2b>] bus_remove_driver+0x5b/0x100
[<e0d3a780>] tg3_cleanup+0x0/0x13 [tg3]
[<c0232fc0>] driver_unregister+0x10/0x20
[<c01db234>] pci_unregister_driver+0x14/0xa0
[<e0d3a78f>] tg3_cleanup+0xf/0x13 [tg3]
[<c013462b>] sys_delete_module+0x17b/0x1e0
[<c0104ff1>] sysenter_past_esp+0x52/0x71
divert: freeing divert_blk for eth0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: BUG: atomic counter underflow when running "rmmod tg3" on 2.6.10-rc1-mm3
2004-11-09 2:33 BUG: atomic counter underflow when running "rmmod tg3" on 2.6.10-rc1-mm3 Bernhard Rosenkraenzer
@ 2004-11-09 5:18 ` David S. Miller
2004-11-09 5:55 ` Patrick McHardy
1 sibling, 0 replies; 3+ messages in thread
From: David S. Miller @ 2004-11-09 5:18 UTC (permalink / raw)
To: Bernhard Rosenkraenzer; +Cc: linux-kernel
On Tue, 9 Nov 2004 03:33:36 +0100
Bernhard Rosenkraenzer <bero@arklinux.org> wrote:
> BUG: atomic counter underflow at:
> [<c02882f6>] qdisc_destroy+0x66/0x80
Yes, this was fixed recently. The fix should be in Linus's
tree as of this morning.
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/11/05 16:30:34-08:00 tgraf@suug.ch
# [PKT_SCHED]: Builtin qdiscs should avoid all qdisc_destroy() processing.
#
# None of the code in __qdisc_destroy should be applied to a builtin qdisc
# or am I missing something?
#
# The patch below prevents builtin qdiscs from being destroyed and
# fixes a refcnt underflow whould lead to a bogus list unlinking
# and dev_put.
#
# Signed-off-by: Thomas Graf <tgraf@suug.ch>
# Signed-off-by: David S. Miller <davem@davemloft.net>
#
# net/sched/sch_generic.c
# 2004/11/05 16:30:14-08:00 tgraf@suug.ch +3 -3
# [PKT_SCHED]: Builtin qdiscs should avoid all qdisc_destroy() processing.
#
# None of the code in __qdisc_destroy should be applied to a builtin qdisc
# or am I missing something?
#
# The patch below prevents builtin qdiscs from being destroyed and
# fixes a refcnt underflow whould lead to a bogus list unlinking
# and dev_put.
#
# Signed-off-by: Thomas Graf <tgraf@suug.ch>
# Signed-off-by: David S. Miller <davem@davemloft.net>
#
diff -Nru a/net/sched/sch_generic.c b/net/sched/sch_generic.c
--- a/net/sched/sch_generic.c 2004-11-08 21:06:35 -08:00
+++ b/net/sched/sch_generic.c 2004-11-08 21:06:35 -08:00
@@ -479,15 +479,15 @@
module_put(ops->owner);
dev_put(qdisc->dev);
- if (!(qdisc->flags&TCQ_F_BUILTIN))
- kfree((char *) qdisc - qdisc->padded);
+ kfree((char *) qdisc - qdisc->padded);
}
/* Under dev->queue_lock and BH! */
void qdisc_destroy(struct Qdisc *qdisc)
{
- if (!atomic_dec_and_test(&qdisc->refcnt))
+ if (qdisc->flags & TCQ_F_BUILTIN ||
+ !atomic_dec_and_test(&qdisc->refcnt))
return;
list_del(&qdisc->list);
call_rcu(&qdisc->q_rcu, __qdisc_destroy);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: BUG: atomic counter underflow when running "rmmod tg3" on 2.6.10-rc1-mm3
2004-11-09 2:33 BUG: atomic counter underflow when running "rmmod tg3" on 2.6.10-rc1-mm3 Bernhard Rosenkraenzer
2004-11-09 5:18 ` David S. Miller
@ 2004-11-09 5:55 ` Patrick McHardy
1 sibling, 0 replies; 3+ messages in thread
From: Patrick McHardy @ 2004-11-09 5:55 UTC (permalink / raw)
To: Bernhard Rosenkraenzer; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1105 bytes --]
Already fixed by this patch.
Regards
Patrick
Bernhard Rosenkraenzer wrote:
>BUG: atomic counter underflow at:
> [<c02882f6>] qdisc_destroy+0x66/0x80
> [<c02885e2>] dev_shutdown+0x32/0x90
> [<c02d796f>] __down_failed_trylock+0x7/0xc
> [<c027b6b2>] unregister_netdevice+0x142/0x29e
> [<c014c171>] handle_mm_fault+0xf1/0x510
> [<c0240a95>] unregister_netdev+0x15/0x20
> [<e0d3a2b5>] tg3_remove_one+0x25/0x70 [tg3]
> [<c01db4e9>] pci_device_remove+0x69/0x70
> [<c0232646>] device_release_driver+0x86/0x90
> [<c0232a2b>] bus_remove_driver+0x5b/0x100
> [<e0d3a780>] tg3_cleanup+0x0/0x13 [tg3]
> [<c0232fc0>] driver_unregister+0x10/0x20
> [<c01db234>] pci_unregister_driver+0x14/0xa0
> [<e0d3a78f>] tg3_cleanup+0xf/0x13 [tg3]
> [<c013462b>] sys_delete_module+0x17b/0x1e0
> [<c0104ff1>] sysenter_past_esp+0x52/0x71
>divert: freeing divert_blk for eth0
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>
>
>
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1771 bytes --]
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/11/05 16:30:34-08:00 tgraf@suug.ch
# [PKT_SCHED]: Builtin qdiscs should avoid all qdisc_destroy() processing.
#
# None of the code in __qdisc_destroy should be applied to a builtin qdisc
# or am I missing something?
#
# The patch below prevents builtin qdiscs from being destroyed and
# fixes a refcnt underflow whould lead to a bogus list unlinking
# and dev_put.
#
# Signed-off-by: Thomas Graf <tgraf@suug.ch>
# Signed-off-by: David S. Miller <davem@davemloft.net>
#
# net/sched/sch_generic.c
# 2004/11/05 16:30:14-08:00 tgraf@suug.ch +3 -3
# [PKT_SCHED]: Builtin qdiscs should avoid all qdisc_destroy() processing.
#
# None of the code in __qdisc_destroy should be applied to a builtin qdisc
# or am I missing something?
#
# The patch below prevents builtin qdiscs from being destroyed and
# fixes a refcnt underflow whould lead to a bogus list unlinking
# and dev_put.
#
# Signed-off-by: Thomas Graf <tgraf@suug.ch>
# Signed-off-by: David S. Miller <davem@davemloft.net>
#
diff -Nru a/net/sched/sch_generic.c b/net/sched/sch_generic.c
--- a/net/sched/sch_generic.c 2004-11-09 06:50:10 +01:00
+++ b/net/sched/sch_generic.c 2004-11-09 06:50:10 +01:00
@@ -479,15 +479,15 @@
module_put(ops->owner);
dev_put(qdisc->dev);
- if (!(qdisc->flags&TCQ_F_BUILTIN))
- kfree((char *) qdisc - qdisc->padded);
+ kfree((char *) qdisc - qdisc->padded);
}
/* Under dev->queue_lock and BH! */
void qdisc_destroy(struct Qdisc *qdisc)
{
- if (!atomic_dec_and_test(&qdisc->refcnt))
+ if (qdisc->flags & TCQ_F_BUILTIN ||
+ !atomic_dec_and_test(&qdisc->refcnt))
return;
list_del(&qdisc->list);
call_rcu(&qdisc->q_rcu, __qdisc_destroy);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-11-09 6:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-09 2:33 BUG: atomic counter underflow when running "rmmod tg3" on 2.6.10-rc1-mm3 Bernhard Rosenkraenzer
2004-11-09 5:18 ` David S. Miller
2004-11-09 5:55 ` Patrick McHardy
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.