Re: 2.6.18-mm3 oops in xfrm_register_mode

From: Badari Pulavarty
Date: Thu Oct 05 2006 - 11:08:23 EST


On Wed, 2006-10-04 at 16:02 -0500, Steve Fox wrote:
> On Wed, 2006-10-04 at 09:57 -0700, Andrew Morton wrote:
>
> > You might well find this bisection lands you on origin.patch. ie: a
> > mainline bug. I note that David merged a few more xfrm fixes this morning.
> >
> > So to confirm that, first test just origin.patch and if that fails, test
> > git-of-the-moment. If that doesn't fail, they fixed it.
>
> origin.patch from --m3 failed. Unfortunately so did a fresh clone of
> Linus's git tree.
>

I am not an expert in that area, but your stack trace made me curious.
Looking at the dis-assembly, line of code in question is:

if (likely(modemap[mode->encap] == NULL)) {

Register contents indicate that, its called as

xfrm_register_mode(&xfrm4_tunnel_mode, AF_INET);
or
xfrm_register_mode(&xfrm4_transport_mode, AF_INET);

(family is AF_INET).

The invalid deref is due to modemap = 0x7ff (RAX: 00000000000007ff)

Since its so easy to reproduce, can you add a printk before
this check to dump mode->encap and modemap, afinfo, family etc ?
Just curious ..


Thanks,
Badari

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