Re: BUG? race between kswapd and ptrace (access_process_vm )

From: Stephen C. Tweedie (sct@redhat.com)
Date: Mon Mar 12 2001 - 06:55:29 EST


Hi,

On Thu, Mar 08, 2001 at 09:12:52PM +0100, Manfred Spraul wrote:
> >
> Fixing the bug is more difficult than I thought:
>
> Initially I assumed it would be a two-liner (lock, unlock) but kmap()
> can sleep.
>
> Can I reuse a kmap_atomic() type or should I add a new type?

I've just tried with the patch below and it seems fine. You don't
need to hold the spinlock over the kmap() call: you only need to hold
a reference to the page.

Cheers,
 Stephen



-
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 : Thu Mar 15 2001 - 21:00:13 EST