All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@redhat.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH]: set state to XFRM_STATE_DEAD before calling xfrm_state_put in pfkey_msg2xfrm_state
Date: Wed, 14 May 2003 17:00:13 +0200	[thread overview]
Message-ID: <3EC259FD.1010706@trash.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 234 bytes --]

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




[-- Attachment #2: af_key-set-xfrm-dead.diff --]
[-- Type: text/plain, Size: 844 bytes --]

# 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);
 }

             reply	other threads:[~2003-05-14 14:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-14 15:00 Patrick McHardy [this message]
2003-05-14 20:13 ` [PATCH]: set state to XFRM_STATE_DEAD before calling xfrm_state_put in pfkey_msg2xfrm_state David S. Miller
2003-05-14 20:29   ` Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EC259FD.1010706@trash.net \
    --to=kaber@trash.net \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.