Re: Strangest bug

Andreas Bombe (andreas.bombe@munich.netsurf.de)
Sat, 24 Jul 1999 17:44:36 +0200


On Fri, Jul 23, 1999 at 10:10:24PM +0200, Kurt Garloff wrote:
> On Fri, Jul 23, 1999 at 03:36:56PM -0400, Stanislav Krasilovskiy wrote:
> > This is not due to memory corruption (in the user process, I
> > continuously print out the values, and they are fine). When I use
> > mlock() on the structure, then the problem no longer occurs (the
> > copy reflects accurate values). So the problem has something to do
> > with virtual addressing and paging...
>
> You are very close to an explanation with your observation that no
> porblems occur with mlock(). mlock() does prevent paging out of the
> memory. When the page is paged out and you want to write to it in
> interrupt context, it won't work: You are not able to page it in.
> mlock() is the right solution to prevent it.

Only if the process owning the variable is running at the time of the
interrupt request and the process really undoubtedly did mlock it. In
other words, no.

-- 
    Andreas E. Bombe <andreas.bombe@munich.netsurf.de>
    http://home.pages.de/~andreas.bombe/
RSA 0x886663c9  30 EC 09 73 84 7B 55 83  C4 7A 91 D9 9D C5 4B B0
DSA 0x04880A44 72E5 7031 4414 2EB6 F6B4  4CBD 1181 7032 0488 0A44

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/