On 2008-06-21, Bill <(E-Mail Removed)> wrote:
> I am getting the following message occasionally while running pings:
>
> KERNEL: assertion (!atomic_read(&skb->users)) failed at net/core/dev.c
> (1524)
>
>
> What does this mean and what might cause it? The code with line 1524
> marked is below.
BUG_TRAP(!atomic_read(&skb->users));
Apparently, BUG_TRAP is a macro that makes an assertion (probably using
assert(3) ). That the assertion was violated means that what it was
asserting (!atomic_read(&skb->users)) was false, when it should have been true.
so the function or macro:
atomic_read(&skb->users)
returned true (non-0) when it was expected to return false (0) (since !
negates the result - true -> false).
To get a more in-depth understanding of what's going on you'll need to
analyze the code.
>
>
>
> static void net_tx_action(struct softirq_action *h)
> {
> struct softnet_data *sd = &__get_cpu_var(softnet_data);
>
> if (sd->completion_queue) {
> struct sk_buff *clist;
>
> local_irq_disable();
> clist = sd->completion_queue;
> sd->completion_queue = NULL;
> local_irq_enable();
>
> while (clist) {
> struct sk_buff *skb = clist;
> clist = clist->next;
> 1524 BUG_TRAP(!atomic_read(&skb->users)); <<<<<<<<<<<<<<<<< LINE
> 1524
> __kfree_skb(skb);
> }
> }
>
> if (sd->output_queue) {
> struct net_device *head;
>
> local_irq_disable();
> head = sd->output_queue;
> sd->output_queue = NULL;
> local_irq_enable();
>
> while (head) {
> struct net_device *dev = head;
> head = head->next_sched;
>
> smp_mb__before_clear_bit();
> clear_bit(__LINK_STATE_SCHED, &dev->state);
>
> if (spin_trylock(&dev->queue_lock)) {
> qdisc_run(dev);
> spin_unlock(&dev->queue_lock);
> } else {
> netif_schedule(dev);
> }
> }
> }
> }
--
|