Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Alexander_Naumov:SLE-12:Update
qemu-linux-user.7445
0340-9pfs-factor-out-pdu_push_and_notify.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0340-9pfs-factor-out-pdu_push_and_notify.patch of Package qemu-linux-user.7445
From c12fd621552860a627281ece8ad6d9148539fe98 Mon Sep 17 00:00:00 2001 From: Wei Liu <wei.liu2@citrix.com> Date: Wed, 2 Dec 2015 14:43:40 +0000 Subject: [PATCH] 9pfs: factor out pdu_push_and_notify 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 f657b17a6394e68f985111d3db33b299deb0cc3e) [BR: Fix and/or infrastructure for BSC#1020427 CVE-2016-9602] Signed-off-by: Bruce Rogers <brogers@suse.com> --- hw/9pfs/virtio-9p.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c index df090dc98b..f35b9199f1 100644 --- a/hw/9pfs/virtio-9p.c +++ b/hw/9pfs/virtio-9p.c @@ -61,6 +61,17 @@ ssize_t pdu_unmarshal(V9fsPDU *pdu, size_t offset, const char *fmt, ...) return ret; } +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); +} + static int omode_to_uflags(int8_t mode) { int ret = 0; @@ -653,11 +664,7 @@ static void pdu_complete(V9fsPDU *pdu, ssize_t len) pdu->size = len; pdu->id = id; - /* push onto queue and notify */ - virtqueue_push(s->vq, &pdu->elem, len); - - /* FIXME: we should batch these completions */ - virtio_notify(VIRTIO_DEVICE(s), s->vq); + pdu_push_and_notify(pdu); /* Now wakeup anybody waiting in flush for this request */ qemu_co_queue_next(&pdu->complete);
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