projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.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
|
blame
|
history
diff --git
a/net/core/net_namespace.c
b/net/core/net_namespace.c
index b7292a2719dc046bd6772cbd8ee4926e811d0254..197283072cc88a9981f21adc9b59d4df8a66557a 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);