projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'xtensa-20151108' of git://github.com/czankel/xtensa-linux
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
misc
/
vmw_vmci
/
vmci_datagram.c
diff --git
a/drivers/misc/vmw_vmci/vmci_datagram.c
b/drivers/misc/vmw_vmci/vmci_datagram.c
index 822665245588767bbbabc0cf3b4a4c47c4f044e3..8a4b6bbe1beedd35a547dc01516526f01c7088fc 100644
(file)
--- a/
drivers/misc/vmw_vmci/vmci_datagram.c
+++ b/
drivers/misc/vmw_vmci/vmci_datagram.c
@@
-276,11
+276,10
@@
static int dg_dispatch_as_host(u32 context_id, struct vmci_datagram *dg)
}
/* We make a copy to enqueue. */
}
/* We make a copy to enqueue. */
- new_dg = km
alloc(
dg_size, GFP_KERNEL);
+ new_dg = km
emdup(dg,
dg_size, GFP_KERNEL);
if (new_dg == NULL)
return VMCI_ERROR_NO_MEM;
if (new_dg == NULL)
return VMCI_ERROR_NO_MEM;
- memcpy(new_dg, dg, dg_size);
retval = vmci_ctx_enqueue_datagram(dg->dst.context, new_dg);
if (retval < VMCI_SUCCESS) {
kfree(new_dg);
retval = vmci_ctx_enqueue_datagram(dg->dst.context, new_dg);
if (retval < VMCI_SUCCESS) {
kfree(new_dg);