memory: don't try to adjust endianness for zero length eventfd
authorJason Wang <jasowang@redhat.com>
Fri, 6 Nov 2015 08:02:45 +0000 (16:02 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 12 Nov 2015 13:49:32 +0000 (15:49 +0200)
commitb8aecea23aaccf39da54c77ef248f5fa50dcfbc1
tree029c44aaaa017d0b13a44da65f5b9caeb1f22a16
parenta6df8adf3edbb3062f087e425564df35077e8410
memory: don't try to adjust endianness for zero length eventfd

There's no need to adjust endianness for zero length eventfd since the
data wrote was actually ignored by kernel. So skip the adjust in this
case to fix a possible crash when trying to use wildcard mmio eventfd
in ppc.

Cc: Greg Kurz <gkurz@linux.vnet.ibm.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
memory.c