From: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
To: linux-s390@vger.kernel.org, kvm@vger.kernel.org, qemu-devel@nongnu.org
Cc: cohuck@redhat.com, borntraeger@de.ibm.com,
bjsdjshi@linux.vnet.ibm.com,
Jing Zhang <bjzhjing@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 1/2] vfio/ccw: allocate irq info with the right size
Date: Tue, 18 Jul 2017 03:49:25 +0200 [thread overview]
Message-ID: <20170718014926.44781-2-bjsdjshi@linux.vnet.ibm.com> (raw)
In-Reply-To: <20170718014926.44781-1-bjsdjshi@linux.vnet.ibm.com>
From: Jing Zhang <bjzhjing@linux.vnet.ibm.com>
When allocating memory for the vfio_irq_info parameter of the
VFIO_DEVICE_GET_IRQ_INFO ioctl, we used the wrong size. Let's
fix it by using the right size.
Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Signed-off-by: Jing Zhang <bjzhjing@linux.vnet.ibm.com>
Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
---
hw/vfio/ccw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
index 12d0262336..8d97b53e77 100644
--- a/hw/vfio/ccw.c
+++ b/hw/vfio/ccw.c
@@ -168,7 +168,7 @@ static void vfio_ccw_register_io_notifier(VFIOCCWDevice *vcdev, Error **errp)
return;
}
- argsz = sizeof(*irq_set);
+ argsz = sizeof(*irq_info);
irq_info = g_malloc0(argsz);
irq_info->index = VFIO_CCW_IO_IRQ_INDEX;
irq_info->argsz = argsz;
--
2.11.2
next prev parent reply other threads:[~2017-07-18 1:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-18 1:49 [Qemu-devel] [PATCH 0/2] vfio-ccw bugfixs Dong Jia Shi
2017-07-18 1:49 ` Dong Jia Shi [this message]
2017-07-18 8:32 ` [Qemu-devel] [PATCH 1/2] vfio/ccw: allocate irq info with the right size Cornelia Huck
2017-07-18 8:49 ` Dong Jia Shi
2017-07-18 9:07 ` Cornelia Huck
2017-07-19 0:32 ` Dong Jia Shi
2017-07-18 1:49 ` [Qemu-devel] [PATCH 2/2] vfio/ccw: fix initialization of the Object DeviceState pointer in the common base-device Dong Jia Shi
2017-07-18 2:26 ` Alex Williamson
2017-07-18 2:42 ` Dong Jia Shi
2017-07-18 8:37 ` Cornelia Huck
2017-07-18 9:26 ` [Qemu-devel] [PATCH 0/2] vfio-ccw bugfixs Cornelia Huck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170718014926.44781-2-bjsdjshi@linux.vnet.ibm.com \
--to=bjsdjshi@linux.vnet.ibm.com \
--cc=bjzhjing@linux.vnet.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).