spin_lock_irqsave(&some_lock, flags1);
/* interupts now off */
save_flags(flags2);
cli();
restore_flags(flags2);
/* interupts are back on, bad stuff happens */
spin_unlock_irqrestore(&some_lock, flags1);
Don't do that.... it's just as bad (although not the same problem)
as going:
spinlock_t a;
spinlock_t b;
spin_lock(&a);
spin_lock(&b);
spin_unlock(&a);
spin_unlock(&b);
Later,
David S. Miller
davem@dm.cobaltmicro.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu