From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: "Timo Teräs" <timo.teras@iki.fi>,
netdev@vger.kernel.org,
"Mark Brown" <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH] xfrm: Fix double dst_release() in xfrm_lookup() -EREMOTE case
Date: Thu, 8 Apr 2010 13:29:33 +0100 [thread overview]
Message-ID: <1270729773-1758-1-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
Commit 80c802 ("xfrm: cache bundles instead of policies for outgoing
flows") changed __xfrm_policy() to call dst_release() when returning
-EREMOTE. In the case where this is called from xfrm_lookup() a double
call to dst_release() would result due to the existing dst_release()
there. Remove the dst_release() in xfrm_lookup().
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
I'm not sure if this is correct or not - there may a reference been
taken earlier in __xfrm_lookup() that's being dropped but I didn't spot
it.
net/xfrm/xfrm_policy.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 7430ac2..f133036 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -1881,7 +1881,6 @@ int xfrm_lookup(struct net *net, struct dst_entry **dst_p, struct flowi *fl,
int err = __xfrm_lookup(net, dst_p, fl, sk, flags);
if (err == -EREMOTE) {
- dst_release(*dst_p);
*dst_p = NULL;
err = -EAGAIN;
}
--
1.7.0.3
next reply other threads:[~2010-04-08 12:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-08 12:29 Mark Brown [this message]
2010-04-08 12:39 ` [PATCH] xfrm: Fix double dst_release() in xfrm_lookup() -EREMOTE case Timo Teräs
2010-04-08 13:43 ` Mark Brown
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=1270729773-1758-1-git-send-email-broonie@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=timo.teras@iki.fi \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).