Messages in this thread |  | | Subject | Re: [PATCH][ATM] make atm (and clip) modular + try_module_get() | Date | Wed, 05 Mar 2003 09:47:38 -0500 | From | chas williams <> |
| |
In message <20030303230706.R2791@almesberger.net>,Werner Almesberger writes: >see getting moved to net/core/skbuff.c, because it seems to provide >a reasonably generic function.
it has been suggested to me that the locking in skb_migrate might not be completely correct. any comments on the following?
spinlock_t *first, *second; if ((unsigned long)from < (unsigned long) to)) { first = &from->lock; second = &to->lock; } else { first = &to->lock; second = &from->lock; }
local_irq_save(flags); spin_lock(&first); spin_lock(&second);
i imagine this is to prevent deadlocks when you do something silly like skb_migrate(a,b) and then skb_migrate(b,a) elsewhere. - 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/
|  |