projects
/
platform
/
kernel
/
linux-arm64.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
162b2be
)
connector: use 'size' everywhere in cn_netlink_send()
author
Mathias Krause
<minipli@googlemail.com>
Mon, 30 Sep 2013 20:03:08 +0000
(22:03 +0200)
committer
David S. Miller
<davem@davemloft.net>
Wed, 2 Oct 2013 20:03:50 +0000
(16:03 -0400)
We calculated the size for the netlink message buffer as size. Use size
in the memcpy() call as well instead of recalculating it.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/connector/connector.c
patch
|
blob
|
history
diff --git
a/drivers/connector/connector.c
b/drivers/connector/connector.c
index 0daa11e418b14968a3720dfa5f35b81bee521eaf..a36749f1e44a869418e1bcab6481334948618391 100644
(file)
--- a/
drivers/connector/connector.c
+++ b/
drivers/connector/connector.c
@@
-109,7
+109,7
@@
int cn_netlink_send(struct cn_msg *msg, u32 __group, gfp_t gfp_mask)
data = nlmsg_data(nlh);
- memcpy(data, msg, size
of(*data) + msg->len
);
+ memcpy(data, msg, size);
NETLINK_CB(skb).dst_group = group;