From: Anthony Liguori <anthony@codemonkey.ws>
To: Amit Shah <amit.shah@redhat.com>
Cc: Alon Levy <alevy@redhat.com>, qemu list <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] virtio-serial-bus: fix ports_map allocation on init
Date: Tue, 01 Jun 2010 13:27:25 -0500 [thread overview]
Message-ID: <4C05510D.6040107@codemonkey.ws> (raw)
In-Reply-To: <a42bfb91257238dc6adb3d0360e488f463490aca.1274261487.git.amit.shah@redhat.com>
On 05/19/2010 04:31 AM, Amit Shah wrote:
> From: Alon Levy<alevy@redhat.com>
>
> Fix for too small allocation to ports_map
>
> Signed-off-by: Alon Levy<alevy@redhat.com>
> Signed-off-by: Amit Shah<amit.shah@redhat.com>
>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
> hw/virtio-serial-bus.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
> index 3ce95e8..7f9d28f 100644
> --- a/hw/virtio-serial-bus.c
> +++ b/hw/virtio-serial-bus.c
> @@ -774,7 +774,8 @@ VirtIODevice *virtio_serial_init(DeviceState *dev, uint32_t max_nr_ports)
> }
>
> vser->config.max_nr_ports = max_nr_ports;
> - vser->ports_map = qemu_mallocz((max_nr_ports + 31) / 32);
> + vser->ports_map = qemu_mallocz(((max_nr_ports + 31) / 32)
> + * sizeof(vser->ports_map[0]));
> /*
> * Reserve location 0 for a console port for backward compat
> * (old kernel, new qemu)
>
prev parent reply other threads:[~2010-06-01 18:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-19 9:31 [Qemu-devel] [PATCH] virtio-serial-bus: fix ports_map allocation on init Amit Shah
2010-06-01 18:27 ` Anthony Liguori [this message]
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=4C05510D.6040107@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=alevy@redhat.com \
--cc=amit.shah@redhat.com \
--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).