* [PATCH] drm: Fix compilation on systems that don't provide O_CLOEXEC
@ 2016-04-20 13:49 Stefan Dirsch
2016-04-20 14:11 ` Eric Engestrom
0 siblings, 1 reply; 7+ messages in thread
From: Stefan Dirsch @ 2016-04-20 13:49 UTC (permalink / raw)
To: dri-devel
Patch suggestion by Thomas Klausner <wiz%NetBSD.org@localhost>. See
also http://mail-index.netbsd.org/pkgsrc-changes/2012/08/13/msg076887.html
Signed-off-by: Stefan Dirsch <sndirsch@suse.de>
---
include/drm/drm.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/drm/drm.h b/include/drm/drm.h
index b4ebaa9..739df01 100644
--- a/include/drm/drm.h
+++ b/include/drm/drm.h
@@ -674,7 +674,11 @@ struct drm_set_client_cap {
};
#define DRM_RDWR O_RDWR
+#ifdef O_CLOEXEC
#define DRM_CLOEXEC O_CLOEXEC
+#else
+#define DRM_CLOEXEC 0
+#endif
struct drm_prime_handle {
__u32 handle;
--
2.6.2
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] drm: Fix compilation on systems that don't provide O_CLOEXEC
2016-04-20 13:49 Stefan Dirsch
@ 2016-04-20 14:11 ` Eric Engestrom
0 siblings, 0 replies; 7+ messages in thread
From: Eric Engestrom @ 2016-04-20 14:11 UTC (permalink / raw)
To: Stefan Dirsch; +Cc: dri-devel
On Wed, Apr 20, 2016 at 03:49:19PM +0200, Stefan Dirsch wrote:
> Patch suggestion by Thomas Klausner <wiz%NetBSD.org@localhost>. See
You might want to replace that with a valid email address, or remove it :)
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] drm: Fix compilation on systems that don't provide O_CLOEXEC
@ 2016-04-20 14:39 Stefan Dirsch
2016-04-20 14:47 ` Daniel Vetter
0 siblings, 1 reply; 7+ messages in thread
From: Stefan Dirsch @ 2016-04-20 14:39 UTC (permalink / raw)
To: dri-devel
Patch suggestion by Thomas Klausner. See also
http://mail-index.netbsd.org/pkgsrc-changes/2012/08/13/msg076887.html
Signed-off-by: Stefan Dirsch <sndirsch@suse.de>
---
include/drm/drm.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/drm/drm.h b/include/drm/drm.h
index b4ebaa9..739df01 100644
--- a/include/drm/drm.h
+++ b/include/drm/drm.h
@@ -674,7 +674,11 @@ struct drm_set_client_cap {
};
#define DRM_RDWR O_RDWR
+#ifdef O_CLOEXEC
#define DRM_CLOEXEC O_CLOEXEC
+#else
+#define DRM_CLOEXEC 0
+#endif
struct drm_prime_handle {
__u32 handle;
--
2.6.2
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] drm: Fix compilation on systems that don't provide O_CLOEXEC
2016-04-20 14:39 [PATCH] drm: Fix compilation on systems that don't provide O_CLOEXEC Stefan Dirsch
@ 2016-04-20 14:47 ` Daniel Vetter
2016-04-20 15:25 ` Stefan Dirsch
0 siblings, 1 reply; 7+ messages in thread
From: Daniel Vetter @ 2016-04-20 14:47 UTC (permalink / raw)
To: Stefan Dirsch; +Cc: dri-devel
On Wed, Apr 20, 2016 at 4:39 PM, Stefan Dirsch <sndirsch@suse.de> wrote:
> Patch suggestion by Thomas Klausner. See also
> http://mail-index.netbsd.org/pkgsrc-changes/2012/08/13/msg076887.html
>
> Signed-off-by: Stefan Dirsch <sndirsch@suse.de>
Fix your OS to have O_CLOEXEC semantics I think is what should happen
here. It's an obvious race in multi-threaded apps, and you need a fix
for it anyway.
-Daniel
> ---
> include/drm/drm.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/include/drm/drm.h b/include/drm/drm.h
> index b4ebaa9..739df01 100644
> --- a/include/drm/drm.h
> +++ b/include/drm/drm.h
> @@ -674,7 +674,11 @@ struct drm_set_client_cap {
> };
>
> #define DRM_RDWR O_RDWR
> +#ifdef O_CLOEXEC
> #define DRM_CLOEXEC O_CLOEXEC
> +#else
> +#define DRM_CLOEXEC 0
> +#endif
> struct drm_prime_handle {
> __u32 handle;
>
> --
> 2.6.2
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm: Fix compilation on systems that don't provide O_CLOEXEC
2016-04-20 14:47 ` Daniel Vetter
@ 2016-04-20 15:25 ` Stefan Dirsch
2016-04-21 12:37 ` Emil Velikov
0 siblings, 1 reply; 7+ messages in thread
From: Stefan Dirsch @ 2016-04-20 15:25 UTC (permalink / raw)
To: Daniel Vetter; +Cc: dri-devel
On Wed, Apr 20, 2016 at 04:47:20PM +0200, Daniel Vetter wrote:
> On Wed, Apr 20, 2016 at 4:39 PM, Stefan Dirsch <sndirsch@suse.de> wrote:
> > Patch suggestion by Thomas Klausner. See also
> > http://mail-index.netbsd.org/pkgsrc-changes/2012/08/13/msg076887.html
> >
> > Signed-off-by: Stefan Dirsch <sndirsch@suse.de>
>
> Fix your OS to have O_CLOEXEC semantics I think is what should happen
> here. It's an obvious race in multi-threaded apps, and you need a fix
> for it anyway.
> -Daniel
Indeed I figured out the patch is no longer needed and finally removed it. ;-)
Thanks,
Stefan
Public Key available
------------------------------------------------------
Stefan Dirsch (Res. & Dev.) SUSE LINUX GmbH
Tel: 0911-740 53 0 Maxfeldstraße 5
FAX: 0911-740 53 479 D-90409 Nürnberg
http://www.suse.de Germany
---------------------------------------------------------------
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham
Norton, HRB 21284 (AG Nürnberg)
---------------------------------------------------------------
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm: Fix compilation on systems that don't provide O_CLOEXEC
2016-04-20 15:25 ` Stefan Dirsch
@ 2016-04-21 12:37 ` Emil Velikov
2016-04-21 13:51 ` Stefan Dirsch
0 siblings, 1 reply; 7+ messages in thread
From: Emil Velikov @ 2016-04-21 12:37 UTC (permalink / raw)
To: Stefan Dirsch; +Cc: dri-devel
On 20 April 2016 at 16:25, Stefan Dirsch <sndirsch@suse.de> wrote:
> On Wed, Apr 20, 2016 at 04:47:20PM +0200, Daniel Vetter wrote:
>> On Wed, Apr 20, 2016 at 4:39 PM, Stefan Dirsch <sndirsch@suse.de> wrote:
>> > Patch suggestion by Thomas Klausner. See also
>> > http://mail-index.netbsd.org/pkgsrc-changes/2012/08/13/msg076887.html
>> >
>> > Signed-off-by: Stefan Dirsch <sndirsch@suse.de>
>>
>> Fix your OS to have O_CLOEXEC semantics I think is what should happen
>> here. It's an obvious race in multi-threaded apps, and you need a fix
>> for it anyway.
>> -Daniel
>
> Indeed I figured out the patch is no longer needed and finally removed it. ;-)
>
No problem Stefan and thanks for starting to get the Suse patches upstreamed.
A few friendly suggestions - please correctly the patch author (if not
yourself) and don't add their s-o-b unless they have done/agreed so.
Thanks,
Emil
P.S. [Note to self~ish~] Perhaps it's time we unconditionally use
O_CLOEXEC in mesa...
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm: Fix compilation on systems that don't provide O_CLOEXEC
2016-04-21 12:37 ` Emil Velikov
@ 2016-04-21 13:51 ` Stefan Dirsch
0 siblings, 0 replies; 7+ messages in thread
From: Stefan Dirsch @ 2016-04-21 13:51 UTC (permalink / raw)
To: Emil Velikov; +Cc: dri-devel
On Thu, Apr 21, 2016 at 01:37:22PM +0100, Emil Velikov wrote:
> On 20 April 2016 at 16:25, Stefan Dirsch <sndirsch@suse.de> wrote:
> > On Wed, Apr 20, 2016 at 04:47:20PM +0200, Daniel Vetter wrote:
> >> On Wed, Apr 20, 2016 at 4:39 PM, Stefan Dirsch <sndirsch@suse.de> wrote:
> >> > Patch suggestion by Thomas Klausner. See also
> >> > http://mail-index.netbsd.org/pkgsrc-changes/2012/08/13/msg076887.html
> >> >
> >> > Signed-off-by: Stefan Dirsch <sndirsch@suse.de>
> >>
> >> Fix your OS to have O_CLOEXEC semantics I think is what should happen
> >> here. It's an obvious race in multi-threaded apps, and you need a fix
> >> for it anyway.
> >> -Daniel
> >
> > Indeed I figured out the patch is no longer needed and finally removed it. ;-)
> >
> No problem Stefan and thanks for starting to get the Suse patches upstreamed.
You're welcome. I'm trying my best. ;-)
> A few friendly suggestions - please correctly the patch author (if not
> yourself) and don't add their s-o-b unless they have done/agreed so.
Fixed and resent. ;-)
Thanks,
Stefan
Public Key available
------------------------------------------------------
Stefan Dirsch (Res. & Dev.) SUSE LINUX GmbH
Tel: 0911-740 53 0 Maxfeldstraße 5
FAX: 0911-740 53 479 D-90409 Nürnberg
http://www.suse.de Germany
---------------------------------------------------------------
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham
Norton, HRB 21284 (AG Nürnberg)
---------------------------------------------------------------
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-04-21 13:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-20 14:39 [PATCH] drm: Fix compilation on systems that don't provide O_CLOEXEC Stefan Dirsch
2016-04-20 14:47 ` Daniel Vetter
2016-04-20 15:25 ` Stefan Dirsch
2016-04-21 12:37 ` Emil Velikov
2016-04-21 13:51 ` Stefan Dirsch
-- strict thread matches above, loose matches on Subject: below --
2016-04-20 13:49 Stefan Dirsch
2016-04-20 14:11 ` Eric Engestrom
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.