From: Kevin Wolf <kwolf@redhat.com>
To: Jeff Cody <jcody@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, pl@kamp.de
Subject: Re: [Qemu-devel] [PATCH for-2.10] block/nfs: fix mutex assertion in nfs_file_close()
Date: Tue, 8 Aug 2017 13:59:44 +0200 [thread overview]
Message-ID: <20170808115944.GI4850@dhcp-200-186.str.redhat.com> (raw)
In-Reply-To: <ebdf772d1a48ccec999866f9c5cb209b2fcedf48.1502144886.git.jcody@redhat.com>
Am 08.08.2017 um 00:29 hat Jeff Cody geschrieben:
> Commit c096358e747e88fc7364e40e3c354ee0bb683960 introduced assertion
> checks for when qemu_mutex() functions are called without the
> corresponding qemu_mutex_init() having initialized the mutex.
>
> This uncovered a latent bug in qemu's nfs driver - in
> nfs_client_close(), the NFSClient structure is overwritten with zeros,
> prior to the mutex being destroyed.
>
> Go ahead and destroy the mutex in nfs_client_close(), and change where
> we call qemu_mutex_init() so that it is correctly balanced.
>
> There are also a couple of memory leaks obscured by the memset, so this
> fixes those as well.
>
> Finally, we should be able to get rid of the memset(), as it isn't
> necessary.
>
> Signed-off-by: Jeff Cody <jcody@redhat.com>
Thanks, applied to the block branch.
Kevin
prev parent reply other threads:[~2017-08-08 11:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-07 22:29 [Qemu-devel] [PATCH for-2.10] block/nfs: fix mutex assertion in nfs_file_close() Jeff Cody
2017-08-07 23:55 ` [Qemu-devel] [Qemu-block] " John Snow
2017-08-08 9:53 ` Stefan Hajnoczi
2017-08-08 11:06 ` [Qemu-devel] " Peter Lieven
2017-08-08 11:59 ` Kevin Wolf [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=20170808115944.GI4850@dhcp-200-186.str.redhat.com \
--to=kwolf@redhat.com \
--cc=jcody@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-block@nongnu.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).