aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorHalil Pasic <[email protected]>2017-01-30 10:09:36 +0000
committerMichael S. Tsirkin <[email protected]>2017-02-03 21:38:57 +0000
commitcda8bba0f99d25d2061c531113c14fa41effc3ae (patch)
treea8efcd70106ad7dc0fb3b56bd1a0ccb79b757d26 /security/selinux/hooks.c
parentRevert "vring: Force use of DMA API for ARM-based systems with legacy devices" (diff)
downloadkernel-cda8bba0f99d25d2061c531113c14fa41effc3ae.tar.gz
kernel-cda8bba0f99d25d2061c531113c14fa41effc3ae.zip
vhost: fix initialization for vq->is_le
Currently, under certain circumstances vhost_init_is_le does just a part of the initialization job, and depends on vhost_reset_is_le being called too. For this reason vhost_vq_init_access used to call vhost_reset_is_le when vq->private_data is NULL. This is not only counter intuitive, but also real a problem because it breaks vhost_net. The bug was introduced to vhost_net with commit 2751c9882b94 ("vhost: cross-endian support for legacy devices"). The symptom is corruption of the vq's used.idx field (virtio) after VHOST_NET_SET_BACKEND was issued as a part of the vhost shutdown on a vq with pending descriptors. Let us make sure the outcome of vhost_init_is_le never depend on the state it is actually supposed to initialize, and fix virtio_net by removing the reset from vhost_vq_init_access. With the above, there is no reason for vhost_reset_is_le to do just half of the job. Let us make vhost_reset_is_le reinitialize is_le. Signed-off-by: Halil Pasic <[email protected]> Reported-by: Michael A. Tebolt <[email protected]> Reported-by: Dr. David Alan Gilbert <[email protected]> Fixes: commit 2751c9882b94 ("vhost: cross-endian support for legacy devices") Cc: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Greg Kurz <[email protected]> Tested-by: Michael A. Tebolt <[email protected]>
Diffstat (limited to 'security/selinux/hooks.c')
0 files changed, 0 insertions, 0 deletions