From: "Daniel P. Berrange" <berrange@redhat.com>
To: Ross Lagerwall <ross.lagerwall@citrix.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 2/4] io: Fix QIOChannelFile when creating and opening read-write
Date: Thu, 18 Jan 2018 13:49:46 +0000 [thread overview]
Message-ID: <20180118134946.GB16350@redhat.com> (raw)
In-Reply-To: <20171101142526.1006-3-ross.lagerwall@citrix.com>
On Wed, Nov 01, 2017 at 02:25:24PM +0000, Ross Lagerwall wrote:
> The code wrongly passes the mode to open() only if O_WRONLY is set.
> Instead, the mode should be passed when O_CREAT is set (or O_TMPFILE on
> Linux). Fix this by always passing the mode since open() will correctly
> ignore the mode if it is not needed. Add a testcase which exercises this
> bug and also change the existing testcase to check that the mode of the
> created file is correct.
>
> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
> ---
> Changed in v2:
> * Separated from qemu_open() change.
>
> include/io/channel-file.h | 2 +-
> io/channel-file.c | 6 +-----
> tests/test-io-channel-file.c | 29 +++++++++++++++++++++++++----
> 3 files changed, 27 insertions(+), 10 deletions(-)
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2018-01-18 13:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-01 14:25 [Qemu-devel] [PATCH v2 0/4] QIOChannelFile bug fixes Ross Lagerwall
2017-11-01 14:25 ` [Qemu-devel] [PATCH v2 1/4] migration: Don't leak IO channels Ross Lagerwall
2018-01-18 13:41 ` Ross Lagerwall
2018-01-18 13:44 ` Daniel P. Berrange
2018-02-06 11:17 ` Dr. David Alan Gilbert
2017-11-01 14:25 ` [Qemu-devel] [PATCH v2 2/4] io: Fix QIOChannelFile when creating and opening read-write Ross Lagerwall
2018-01-18 13:49 ` Daniel P. Berrange [this message]
2017-11-01 14:25 ` [Qemu-devel] [PATCH v2 3/4] io: Don't call close multiple times in QIOChannelFile Ross Lagerwall
2017-11-01 18:11 ` Marc-André Lureau
2018-01-18 13:50 ` Daniel P. Berrange
2017-11-01 14:25 ` [Qemu-devel] [PATCH v2 4/4] io: Add /dev/fdset/ support to QIOChannelFile Ross Lagerwall
2017-11-01 18:12 ` Marc-André Lureau
2018-01-18 13:50 ` Daniel P. Berrange
2018-01-18 13:40 ` [Qemu-devel] [PATCH v2 0/4] QIOChannelFile bug fixes Ross Lagerwall
2018-01-18 13:47 ` Daniel P. Berrange
2018-01-18 13:51 ` Daniel P. Berrange
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=20180118134946.GB16350@redhat.com \
--to=berrange@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=ross.lagerwall@citrix.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.