qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
To: Cornelia Huck <cohuck@redhat.com>
Cc: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>,
	linux-s390@vger.kernel.org, kvm@vger.kernel.org,
	qemu-devel@nongnu.org, borntraeger@de.ibm.com,
	Jing Zhang <bjzhjing@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH 1/2] vfio/ccw: allocate irq info with the right size
Date: Wed, 19 Jul 2017 08:32:55 +0800	[thread overview]
Message-ID: <20170719003255.GA11964@bjsdjshi@linux.vnet.ibm.com> (raw)
In-Reply-To: <20170718110749.5e7bcc65@gondolin>

* Cornelia Huck <cohuck@redhat.com> [2017-07-18 11:07:49 +0200]:

> On Tue, 18 Jul 2017 16:49:43 +0800
> Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> wrote:
> 
> > * Cornelia Huck <cohuck@redhat.com> [2017-07-18 10:32:13 +0200]:
> > 
> > > On Tue, 18 Jul 2017 03:49:25 +0200
> > > Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> wrote:
> > >   
> > > > 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;  
> > > 
> > > irq_set is larger than irq_info, but yes, let's do this correctly.
> > > 
> > > Out of curiosity, how did you spot this?
> > >   
> > 
> > I'm trying to reuse the code here, while introducing some new MMIO
> > regions, which you will see them some days later. ;>
> > 
> 
> Looking forward to that :)
> 

If they are lucky enough to survive the internal review to meet you.
haha.

  reply	other threads:[~2017-07-19  0:33 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 ` [Qemu-devel] [PATCH 1/2] vfio/ccw: allocate irq info with the right size Dong Jia Shi
2017-07-18  8:32   ` 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 [this message]
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=20170719003255.GA11964@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).