]> git.baikalelectronics.ru Git - kernel.git/commit
Tools: hv: update buffer handling in hv_fcopy_daemon
authorOlaf Hering <olaf@aepfle.de>
Thu, 10 Aug 2017 22:45:16 +0000 (15:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Aug 2017 16:16:29 +0000 (09:16 -0700)
commit248430575d1fa4fa76d47f8764718f311a7e14e7
tree6cd6821ba8f7de289eaea3b5951dbee1fcf57d78
parent83fbe96776ebd199b7c00602bd84ea8edcbef8ad
Tools: hv: update buffer handling in hv_fcopy_daemon

Currently this warning is triggered when compiling hv_fcopy_daemon:

hv_fcopy_daemon.c:216:4: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
    kernel_modver = *(__u32 *)buffer;

Convert the send/receive buffer to a union and pass individual members as
needed. This also gives the correct size for the buffer.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/hv/hv_fcopy_daemon.c