diff options
author | Halil Pasic <pasic@linux.vnet.ibm.com> | 2017-03-02 19:13:08 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2017-03-29 02:35:23 +0300 |
commit | aa262928595d431bfee7914cb7d9d79197f887a2 (patch) | |
tree | 8dfbad003754d9e9707f272609c656c248ab842a /blockjob.c | |
parent | df9046363220e57d45818312759b954c033c58ab (diff) |
event_notifier: prevent accidental use after close
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>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'blockjob.c')
0 files changed, 0 insertions, 0 deletions