/[linux-patches]/genpatches-2.6/trunk/2.6.14/1119_3_ipv6-advapi-memory.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.14/1119_3_ipv6-advapi-memory.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 214 - (show annotations) (download) (as text)
Fri Nov 25 00:35:16 2005 UTC (15 years ago) by dsd
Original Path: genpatches-2.6/trunk/2.6.14/1019_3_ipv6-advapi-memory.patch
File MIME type: text/x-diff
File size: 1082 byte(s)
Linux 2.6.14.3
1 From stable-bounces@linux.kernel.org Mon Nov 21 02:06:49 2005
2 Date: Mon, 21 Nov 2005 19:07:25 +0900 (JST)
3 Message-Id: <20051121.190725.16741184.yoshfuji@linux-ipv6.org>
4 To: stable@kernel.org
5 From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
6 Cc: yoshfuji@linux-ipv6.org
7 Subject: [PATCH] [IPV6]: Fix memory management error during setting up new advapi sockopts.
8
9 Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
10 Signed-off-by: Chris Wright <chrisw@osdl.org>
11 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 ---
13 net/ipv6/exthdrs.c | 3 ++-
14 1 file changed, 2 insertions(+), 1 deletion(-)
15
16 --- linux-2.6.14.2.orig/net/ipv6/exthdrs.c
17 +++ linux-2.6.14.2/net/ipv6/exthdrs.c
18 @@ -628,6 +628,7 @@ ipv6_renew_options(struct sock *sk, stru
19 if (!tot_len)
20 return NULL;
21
22 + tot_len += sizeof(*opt2);
23 opt2 = sock_kmalloc(sk, tot_len, GFP_ATOMIC);
24 if (!opt2)
25 return ERR_PTR(-ENOBUFS);
26 @@ -668,7 +669,7 @@ ipv6_renew_options(struct sock *sk, stru
27
28 return opt2;
29 out:
30 - sock_kfree_s(sk, p, tot_len);
31 + sock_kfree_s(sk, opt2, opt2->tot_len);
32 return ERR_PTR(err);
33 }
34

  ViewVC Help
Powered by ViewVC 1.1.20