Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost

Pull virtio fixes from Michael Tsirkin:
"Some minor fixes"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
vringh: fix copy direction of vringh_iov_push_kern()
vsock/virtio: remove unused 'work' field from 'struct virtio_vsock_pkt'
virtio_ring: fix stalls for packed rings

+10 -6
+7 -1
drivers/vhost/vringh.c
··· 852 852 return 0; 853 853 } 854 854 855 + static inline int kern_xfer(void *dst, void *src, size_t len) 856 + { 857 + memcpy(dst, src, len); 858 + return 0; 859 + } 860 + 855 861 /** 856 862 * vringh_init_kern - initialize a vringh for a kernelspace vring. 857 863 * @vrh: the vringh to initialize. ··· 964 958 ssize_t vringh_iov_push_kern(struct vringh_kiov *wiov, 965 959 const void *src, size_t len) 966 960 { 967 - return vringh_iov_xfer(wiov, (void *)src, len, xfer_kern); 961 + return vringh_iov_xfer(wiov, (void *)src, len, kern_xfer); 968 962 } 969 963 EXPORT_SYMBOL(vringh_iov_push_kern); 970 964
+3 -4
drivers/virtio/virtio_ring.c
··· 1499 1499 * counter first before updating event flags. 1500 1500 */ 1501 1501 virtio_wmb(vq->weak_barriers); 1502 - } else { 1503 - used_idx = vq->last_used_idx; 1504 - wrap_counter = vq->packed.used_wrap_counter; 1505 1502 } 1506 1503 1507 1504 if (vq->packed.event_flags_shadow == VRING_PACKED_EVENT_FLAG_DISABLE) { ··· 1515 1518 */ 1516 1519 virtio_mb(vq->weak_barriers); 1517 1520 1518 - if (is_used_desc_packed(vq, used_idx, wrap_counter)) { 1521 + if (is_used_desc_packed(vq, 1522 + vq->last_used_idx, 1523 + vq->packed.used_wrap_counter)) { 1519 1524 END_USE(vq); 1520 1525 return false; 1521 1526 }
-1
include/linux/virtio_vsock.h
··· 48 48 49 49 struct virtio_vsock_pkt { 50 50 struct virtio_vsock_hdr hdr; 51 - struct work_struct work; 52 51 struct list_head list; 53 52 /* socket refcnt not held, only use for cancellation */ 54 53 struct vsock_sock *vsk;