Re: [PATCH 2/6] [-mm] epoll: don't use current in irq context

From: Davide Libenzi
Date: Fri Feb 27 2009 - 17:08:45 EST


On Tue, 24 Feb 2009, Tony Battersby wrote:

> ep_call_nested() (formerly ep_poll_safewake()) uses "current" to detect
> callback recursion, but it may be called from irq context where the
> use of current is generally frowned upon. It would be better to use
> get_cpu() and put_cpu() to detect the callback recursion.

Oh, I forgot about this one ...
We're not actually dereferencing anything in current, by using it as a
cookie. But yes, getting the CPU is better, even at preemption expenses.
Thank you for your report Tony.


Acked-by: Davide Libenzi <davidel@xxxxxxxxxxxxxxx>


- Davide


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