From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: "Michel Dänzer" <michel@daenzer.net>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH libdrm] Always pass O_CLOEXEC when opening DRM file descriptors
Date: Fri, 18 May 2018 12:50:28 +0200 [thread overview]
Message-ID: <172c8fb2-2c3f-00e7-9e59-1595e99be6ce@gmail.com> (raw)
In-Reply-To: <20180518091753.11491-1-michel@daenzer.net>
Am 18.05.2018 um 11:17 schrieb Michel Dänzer:
> From: Michel Dänzer <michel.daenzer@amd.com>
>
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> xf86drm.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/xf86drm.c b/xf86drm.c
> index 3a9d0ed2..c09437b0 100644
> --- a/xf86drm.c
> +++ b/xf86drm.c
> @@ -405,7 +405,7 @@ wait_for_udev:
> }
> #endif
>
> - fd = open(buf, O_RDWR, 0);
> + fd = open(buf, O_RDWR | O_CLOEXEC, 0);
> drmMsg("drmOpenDevice: open result is %d, (%s)\n",
> fd, fd < 0 ? strerror(errno) : "OK");
> if (fd >= 0)
> @@ -425,7 +425,7 @@ wait_for_udev:
> chmod(buf, devmode);
> }
> }
> - fd = open(buf, O_RDWR, 0);
> + fd = open(buf, O_RDWR | O_CLOEXEC, 0);
> drmMsg("drmOpenDevice: open result is %d, (%s)\n",
> fd, fd < 0 ? strerror(errno) : "OK");
> if (fd >= 0)
> @@ -474,7 +474,7 @@ static int drmOpenMinor(int minor, int create, int type)
> };
>
> sprintf(buf, dev_name, DRM_DIR_NAME, minor);
> - if ((fd = open(buf, O_RDWR, 0)) >= 0)
> + if ((fd = open(buf, O_RDWR | O_CLOEXEC, 0)) >= 0)
> return fd;
> return -errno;
> }
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2018-05-18 10:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-18 9:17 [PATCH libdrm] Always pass O_CLOEXEC when opening DRM file descriptors Michel Dänzer
2018-05-18 10:50 ` Christian König [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=172c8fb2-2c3f-00e7-9e59-1595e99be6ce@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=michel@daenzer.net \
/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).