Re: atomic copy_from_user?

From: Rob Love
Date: Mon Dec 22 2003 - 17:16:53 EST


On Mon, 2003-12-22 at 16:59, Joe Korty wrote:

> I do not see why a non-preempt kernel would care at all about
> the value of preempt_count. (kmap_atomic is obviously setting it,
> where is the place in a non-preempt kernel where the set value
> is being acted upon?).

Last I checked, the architecture-specific page fault handlers. They do
something like:

if (in_atomic())
goto do_not_service_fault;

This let us implement the atomic copy_*_user() functions.

kmap_atomic() needs to mark the system atomic, so the in_atomic() will
fail.

This was done around ~2.5.30 by akpm.

Rob Love


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