projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
446e72f
)
net: net_assign_generic() fix
author
Eric Dumazet
<eric.dumazet@gmail.com>
Tue, 28 Jul 2009 02:36:15 +0000
(
02:36
+0000)
committer
David S. Miller
<davem@davemloft.net>
Sun, 2 Aug 2009 19:20:36 +0000
(12:20 -0700)
memcpy() should take into account size of pointers,
not only number of pointers to copy.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/net_namespace.c
patch
|
blob
|
history
diff --git
a/net/core/net_namespace.c
b/net/core/net_namespace.c
index
b7292a2
..
1972830
100644
(file)
--- a/
net/core/net_namespace.c
+++ b/
net/core/net_namespace.c
@@
-488,7
+488,7
@@
int net_assign_generic(struct net *net, int id, void *data)
*/
ng->len = id;
- memcpy(&ng->ptr, &old_ng->ptr, old_ng->len);
+ memcpy(&ng->ptr, &old_ng->ptr, old_ng->len
* sizeof(void*)
);
rcu_assign_pointer(net->gen, ng);
call_rcu(&old_ng->rcu, net_generic_release);