From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: fam@euphon.net, kwolf@redhat.com, qemu-stable@nongnu.org,
qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] pr-manager: Fix invalid g_free() crash bug
Date: Thu, 22 Aug 2019 18:39:41 +0200 [thread overview]
Message-ID: <d5a993f3-0793-182b-f1ff-658801455cfd@redhat.com> (raw)
In-Reply-To: <20190822133846.10923-1-armbru@redhat.com>
On 22/08/19 15:38, Markus Armbruster wrote:
> pr_manager_worker() passes its @opaque argument to g_free(). Wrong;
> it points to pr_manager_worker()'s automatic @data. Broken when
> commit 2f3a7ab39be converted @data from heap- to stack-allocated. Fix
> by deleting the g_free().
>
> Fixes: 2f3a7ab39bec4ba8022dc4d42ea641165b004e3e
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> scsi/pr-manager.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/scsi/pr-manager.c b/scsi/pr-manager.c
> index ee43663576..0c866e8698 100644
> --- a/scsi/pr-manager.c
> +++ b/scsi/pr-manager.c
> @@ -39,7 +39,6 @@ static int pr_manager_worker(void *opaque)
> int fd = data->fd;
> int r;
>
> - g_free(data);
> trace_pr_manager_run(fd, hdr->cmdp[0], hdr->cmdp[1]);
>
> /* The reference was taken in pr_manager_execute. */
>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Since I am disappearing soon, I wouldn't mind if the block layer people
picked this up.
Paolo
next prev parent reply other threads:[~2019-08-22 16:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-22 13:38 [Qemu-devel] [PATCH] pr-manager: Fix invalid g_free() crash bug Markus Armbruster
2019-08-22 14:54 ` Philippe Mathieu-Daudé
2019-08-22 16:39 ` Paolo Bonzini [this message]
2019-09-02 14:10 ` Kevin Wolf
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=d5a993f3-0793-182b-f1ff-658801455cfd@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=fam@euphon.net \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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).