Re: [PATCH]: set state to XFRM_STATE_DEAD before calling

David S. Miller (davem@redhat.com)
Wed, 14 May 2003 13:13:19 -0700 (PDT)


From: Patrick McHardy <kaber@trash.net>
Date: Wed, 14 May 2003 17:00:13 +0200

This patch sets x->state to XFRM_STATE_DEAD before calling
xfrm_state_put in pfkey_msg2xfrm_state to avoid triggering
the BUG_TRAP in __xfrm_state_destroy. The patch applies to both
2.5 and the 2.4 backport.

You didn't test this change. x->type is a pointer, not a place where
you put XFRM_STATE_DEAD, a simple compile test would have alerted
this to you.

This also means you couldn't possibly have tested if this even
makes the assertion go away, it couldn't possibly have fixed this..

The correct fix, of course, is to set x->km.state to this value.
This is what I've done in my tree.

Please be a LOT more careful with your changes.
-
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/