diff options
author | Mathias Krause <minipli@googlemail.com> | 2013-09-30 22:03:08 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-02 16:03:50 -0400 |
commit | ac73bf50b709dea4e39635151b861b8a8f52bfbb (patch) | |
tree | f63b489a95edfd71781772370511fe16bb398fb0 | |
parent | 162b2bedc084d2d908a04c93383ba02348b648b0 (diff) | |
download | linux-stable-ac73bf50b709dea4e39635151b861b8a8f52bfbb.tar.gz linux-stable-ac73bf50b709dea4e39635151b861b8a8f52bfbb.tar.bz2 linux-stable-ac73bf50b709dea4e39635151b861b8a8f52bfbb.zip |
connector: use 'size' everywhere in cn_netlink_send()
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>
-rw-r--r-- | drivers/connector/connector.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c index 0daa11e418b1..a36749f1e44a 100644 --- 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, sizeof(*data) + msg->len); + memcpy(data, msg, size); NETLINK_CB(skb).dst_group = group; |