On Fri, Apr 1, 2022 at 12:31 PM Philippe Mathieu-Daudé <philippe.mathieu.da...@gmail.com> wrote: > > On 1/4/22 04:31, Jason Wang wrote: > > On Fri, Apr 1, 2022 at 2:29 AM Eugenio Pérez <epere...@redhat.com> wrote: > >> > >> Fixing that literal checkpatch.pl because it will complain when we modify > >> the file > > See https://www.mail-archive.com/qemu-devel@nongnu.org/msg834178.html >
Sorry I missed that series. It performs more replacements so regarding virtio it's better to push yours. Thanks! > >> Signed-off-by: Eugenio Pérez <epere...@redhat.com> > > > > Acked-by: Jason Wang <jasow...@redhat.com> > > > >> --- > >> hw/net/virtio-net.c | 3 ++- > >> 1 file changed, 2 insertions(+), 1 deletion(-) > >> > >> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c > >> index 1067e72b39..e4748a7e6c 100644 > >> --- a/hw/net/virtio-net.c > >> +++ b/hw/net/virtio-net.c > >> @@ -1443,7 +1443,8 @@ static void virtio_net_handle_ctrl(VirtIODevice > >> *vdev, VirtQueue *vq) > >> } > >> > >> iov_cnt = elem->out_num; > >> - iov2 = iov = g_memdup(elem->out_sg, sizeof(struct iovec) * > >> elem->out_num); > >> + iov2 = iov = g_memdup2(elem->out_sg, > >> + sizeof(struct iovec) * elem->out_num); > >> s = iov_to_buf(iov, iov_cnt, 0, &ctrl, sizeof(ctrl)); > >> iov_discard_front(&iov, &iov_cnt, sizeof(ctrl)); > >> if (s != sizeof(ctrl)) { > >> -- > >> 2.27.0 > >> > > >