From: Stefan Hajnoczi <stefanha@gmail.com>
To: Halil Pasic <pasic@linux.vnet.ibm.com>
Cc: qemu-devel@nongnu.org, Stefan Weil <sw@weilnetz.de>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/1] event_notifier: prevent accidental use after close
Date: Fri, 3 Mar 2017 10:23:47 +0800 [thread overview]
Message-ID: <20170303022347.GD11833@stefanha-x1.localdomain> (raw)
In-Reply-To: <20170302181308.69662-1-pasic@linux.vnet.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 850 bytes --]
On Thu, Mar 02, 2017 at 07:13:08PM +0100, Halil Pasic wrote:
> Let's set the handles to the underlying facilities to their extremal
> value so no accidental misuse can happen, and to make it obvious that the
> notifier is dysfunctional. E.g. if we just close an fd but do not touch
> the int holding the fd eventually a read/write could succeed again when
> the fd gets reused, and corrupt the file addressed by the fd.
>
> Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>
> ---
>
> No strong feelings about this, but obviously, I do think it's worth a
> try.
>
> The one who brought this unfortunate possibility to my attention was
> Michael Tsirkin.
> ---
> util/event_notifier-posix.c | 2 ++
> util/event_notifier-win32.c | 1 +
> 2 files changed, 3 insertions(+)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
prev parent reply other threads:[~2017-03-03 2:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-02 18:13 [Qemu-devel] [PATCH 1/1] event_notifier: prevent accidental use after close Halil Pasic
2017-03-03 2:23 ` Stefan Hajnoczi [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=20170303022347.GD11833@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=mst@redhat.com \
--cc=pasic@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
/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).