Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
qemu.5922
0190-9pfs-factor-out-virtio_9p_push_and_.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0190-9pfs-factor-out-virtio_9p_push_and_.patch of Package qemu.5922
From c2a314234c7363ff52ffd3d642f3830aba672156 Mon Sep 17 00:00:00 2001 From: Wei Liu <wei.liu2@citrix.com> Date: Thu, 7 Jan 2016 18:30:29 +0000 Subject: [PATCH] 9pfs: factor out virtio_9p_push_and_notify The new function resides in virtio specific file. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> cherry picked from commit 0d3716b4e6ba81e8632c4ca698488b6e843f9daf) [BR: Fix and/or infrastructure for BSC#1020427 CVE-2016-9602] Signed-off-by: Bruce Rogers <brogers@suse.com> --- hw/9pfs/virtio-9p-device.c | 11 +++++++++++ hw/9pfs/virtio-9p.c | 8 +------- hw/9pfs/virtio-9p.h | 2 ++ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index 8578278324..010d00c84e 100644 --- a/hw/9pfs/virtio-9p-device.c +++ b/hw/9pfs/virtio-9p-device.c @@ -20,6 +20,17 @@ #include "virtio-9p-coth.h" #include "hw/virtio/virtio-access.h" +void virtio_9p_push_and_notify(V9fsPDU *pdu) +{ + V9fsState *s = pdu->s; + + /* push onto queue and notify */ + virtqueue_push(s->vq, &pdu->elem, pdu->size); + + /* FIXME: we should batch these completions */ + virtio_notify(VIRTIO_DEVICE(s), s->vq); +} + static uint32_t virtio_9p_get_features(VirtIODevice *vdev, uint32_t features) { virtio_add_feature(&features, VIRTIO_9P_MOUNT_TAG); diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c index 3d8c1cffa1..86017899d7 100644 --- a/hw/9pfs/virtio-9p.c +++ b/hw/9pfs/virtio-9p.c @@ -63,13 +63,7 @@ ssize_t pdu_unmarshal(V9fsPDU *pdu, size_t offset, const char *fmt, ...) static void pdu_push_and_notify(V9fsPDU *pdu) { - V9fsState *s = pdu->s; - - /* push onto queue and notify */ - virtqueue_push(s->vq, &pdu->elem, pdu->size); - - /* FIXME: we should batch these completions */ - virtio_notify(VIRTIO_DEVICE(s), s->vq); + virtio_9p_push_and_notify(pdu); } static int omode_to_uflags(int8_t mode) diff --git a/hw/9pfs/virtio-9p.h b/hw/9pfs/virtio-9p.h index b4d344af95..a1ac3980ee 100644 --- a/hw/9pfs/virtio-9p.h +++ b/hw/9pfs/virtio-9p.h @@ -6,6 +6,8 @@ #include "9p.h" extern void handle_9p_output(VirtIODevice *vdev, VirtQueue *vq); +extern void virtio_9p_push_and_notify(V9fsPDU *pdu); + ssize_t virtio_pdu_vmarshal(V9fsPDU *pdu, size_t offset, const char *fmt, va_list ap); ssize_t virtio_pdu_vunmarshal(V9fsPDU *pdu, size_t offset,
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor