lkml.org 
[lkml]   [2003]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH]: set state to XFRM_STATE_DEAD before calling xfrm_state_put in pfkey_msg2xfrm_state
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.

Best regards,
Patrick



# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1113 -> 1.1114
# net/key/af_key.c 1.35 -> 1.36
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/05/14 kaber@trash.net 1.1114
# [IPSEC]: set state to XFRM_STATE_DEAD before calling xfrm_state_put in pfkey_msg2xfrm_state
# --------------------------------------------
#
diff -Nru a/net/key/af_key.c b/net/key/af_key.c
--- a/net/key/af_key.c Wed May 14 16:56:52 2003
+++ b/net/key/af_key.c Wed May 14 16:56:52 2003
@@ -1090,6 +1090,7 @@
return x;

out:
+ x->type = XFRM_STATE_DEAD;
xfrm_state_put(x);
return ERR_PTR(-ENOBUFS);
}
\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.020 / U:1.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site