Re: [2.5.67] BUG at kernel/softirq.c:105

From: Andrew Morton (akpm@digeo.com)
Date: Tue Apr 08 2003 - 05:28:32 EST


"Marco d'Itri" <md@Linux.IT> wrote:
>
> I think this happened after killing pppd, but I'm not 100% sure.

It is due to this stuff, in drivers/char/tty_io.c:

        /* FIXME! What are the locking issues here? This may me overdoing things..
        * this question is especially important now that we've removed the irqlock. */
        {
                unsigned long flags;

                local_irq_save(flags); // FIXME: is this safe?
                if (tty->ldisc.flush_buffer)
                        tty->ldisc.flush_buffer(tty);
                if (tty->driver.flush_buffer)
                        tty->driver.flush_buffer(tty);
                if ((test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags)) &&
                    tty->ldisc.write_wakeup)
                        (tty->ldisc.write_wakeup)(tty);
                local_irq_restore(flags); // FIXME: is this safe?
        }

We end up calling local_bh_enable(), which goes BUG if local interrupts are
disabled. It goes BUG because local_bh_enable() will enable interrupts
unconditionally, therefore calling it with interrupts disabled is deadlocky
and wrong.

So our hand is forced. We have to fix that crap up. I wonder how?

-
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/



This archive was generated by hypermail 2b29 : Tue Apr 15 2003 - 22:00:15 EST