netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipv6: Don't pass invalid dst_entry pointer to dst_release().
@ 2011-04-04 19:55 Boris Ostrovsky
  2011-04-04 20:07 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Boris Ostrovsky @ 2011-04-04 19:55 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-kernel, Boris Ostrovsky

From: Boris Ostrovsky <boris.ostrovsky@amd.com>

Make sure dst_release() is not called with error pointer. This is
similar to commit 4910ac6c526d2868adcb5893e0c428473de862b5.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>
---
 net/ipv6/tcp_ipv6.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 2b0c186..56fa125 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -503,6 +503,7 @@ static int tcp_v6_send_synack(struct sock *sk, struct request_sock *req,
 	dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false);
 	if (IS_ERR(dst)) {
 		err = PTR_ERR(dst);
+		dst = NULL;
 		goto done;
 	}
 	skb = tcp_make_synack(sk, dst, req, rvp);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ipv6: Don't pass invalid dst_entry pointer to dst_release().
  2011-04-04 19:55 [PATCH] ipv6: Don't pass invalid dst_entry pointer to dst_release() Boris Ostrovsky
@ 2011-04-04 20:07 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-04-04 20:07 UTC (permalink / raw)
  To: ostr; +Cc: netdev, linux-kernel, boris.ostrovsky

From: Boris Ostrovsky <ostr@amd64.org>
Date: Mon,  4 Apr 2011 15:55:10 -0400

> From: Boris Ostrovsky <boris.ostrovsky@amd.com>
> 
> Make sure dst_release() is not called with error pointer. This is
> similar to commit 4910ac6c526d2868adcb5893e0c428473de862b5.
> 
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>

Applied, thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-04-04 20:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-04 19:55 [PATCH] ipv6: Don't pass invalid dst_entry pointer to dst_release() Boris Ostrovsky
2011-04-04 20:07 ` David Miller

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).