projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b76c49
)
ipvs: freeing uninitialized pointer on error
author
Dan Carpenter
<dan.carpenter@oracle.com>
Fri, 25 Jan 2013 15:44:57 +0000
(18:44 +0300)
committer
Simon Horman
<horms@verge.net.au>
Mon, 28 Jan 2013 01:14:37 +0000
(10:14 +0900)
If state != IP_VS_STATE_BACKUP then tinfo->buf is uninitialized. If
kthread_run() fails then it means we free random memory resulting in an
oops.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
net/netfilter/ipvs/ip_vs_sync.c
patch
|
blob
|
blame
|
history
diff --git
a/net/netfilter/ipvs/ip_vs_sync.c
b/net/netfilter/ipvs/ip_vs_sync.c
index effa10c9e4e325bc3d5538f2d94988c191d7ba56..44fd10c539ac42dfaa967974051bdfacb17099fb 100644
(file)
--- a/
net/netfilter/ipvs/ip_vs_sync.c
+++ b/
net/netfilter/ipvs/ip_vs_sync.c
@@
-1795,6
+1795,8
@@
int start_sync_thread(struct net *net, int state, char *mcast_ifn, __u8 syncid)
GFP_KERNEL);
if (!tinfo->buf)
goto outtinfo;
+ } else {
+ tinfo->buf = NULL;
}
tinfo->id = id;