Yeah. It should also probably use "in_atomic()" instead of
"in_interrupt()", since that also finds people who have marked themselves
non-preemptible.
So what the test SHOULD look like is this:
if (gfp_mask & __GFP_WAIT) {
if (in_atomic() || irqs_disabled()) {
static int count = 0;
...
}
}
which should catch all the cases we really care about.
Linus
-
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/