Re: mmotm 2010-10-20-15-01 uploaded

From: Peter Zijlstra
Date: Thu Oct 21 2010 - 03:18:38 EST


On Wed, 2010-10-20 at 20:46 -0700, Andrew Morton wrote:
>
> > ------------[ cut here ]------------
> > WARNING: at arch/x86/mm/highmem_32.c:82 __kunmap_atomic+0x80/0xd4()
>
> WARN_ON_ONCE(idx !=
> ((vaddr - __fix_to_virt(FIX_KMAP_BEGIN)) >> PAGE_SHIFT));
>
> > Hardware name: ASPIRE AG1720
> > Modules linked in:
> > Pid: 1, comm: swapper Not tainted 2.6.36-rc8-mm1+ #1
> > Call Trace:
> > [<c0440982>] warn_slowpath_common+0x6a/0x7f
> > [<c042e6c5>] ? __kunmap_atomic+0x80/0xd4
> > [<c04409ab>] warn_slowpath_null+0x14/0x18
> > [<c042e6c5>] __kunmap_atomic+0x80/0xd4
> > [<c04f2d1f>] zero_user_segments+0x5e/0x64
> > [<c04f2e58>] simple_write_begin+0x5e/0x6c
> > [<c04a6518>] generic_file_buffered_write+0xc0/0x1c5

<snip>

> It would have been clearer to do
>
> WARN_ON_ONCE(vaddr != __fix_to_virt(FIX_KMAP_BEGIN + idx))
>
> but I don't see what's gone wrong here. Peter?

Right, so that's the warning that the unmapped address isn't actually
the top-of-stack one.

Your version is much nicer, although I haven't looked too hard at it, I
probably got my head in a twist.

But like you, I cannot directly see what's going wrong here,
zero_user_segments() seems a simple enough function without any
kmap_atomic nesting, so I'm not at all seeing how that's going wrong.

/me goes find where you hide your mmotm patch-queue and stare at the
actual code.

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