Re: in_atomic doesn't count local_irq_disable?

From: Rusty Russell
Date: Mon Dec 29 2003 - 23:55:41 EST


On Mon, 29 Dec 2003 19:03:36 +0530
Srivatsa Vaddagiri <vatsa@xxxxxxxxxx> wrote:

> do_page_fault avoids calling this down_read if we are "in_atomic()"
> Isn't in_atomic supposed to count IRQs disabled case? If not
> then shouldn't do_page_fault also check for irqs_disabled()
> before calling down_read()?

in_atomic() doesn't actually return true if irqs are disabled.

hence "(in_atomic() || irqs_disabled())" in __might_sleep.

do_page_fault should have the same test...

Thanks,
Rusty.
--
there are those who do and those who hang on and you don't see too
many doers quoting their contemporaries. -- Larry McVoy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/