All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH lttng-tools v2] Fix: COMPAT_EPOLL_PROC_PATH is available from Linux 2.6.28
       [not found] <20170509194635.18701-1-jonathan.rajotte-julien@efficios.com>
@ 2017-05-11 14:45 ` Jérémie Galarneau
  0 siblings, 0 replies; 2+ messages in thread
From: Jérémie Galarneau @ 2017-05-11 14:45 UTC (permalink / raw)
  To: Jonathan Rajotte; +Cc: lttng-dev, Jeremie Galarneau

Merged in master, stable-2.10, stable-2.9, and stable-2.8.

Thanks!
Jérémie

On 9 May 2017 at 15:46, Jonathan Rajotte
<jonathan.rajotte-julien@efficios.com> wrote:
> v2: Typo in commit message "per see" -> "per se"
>
> Failing on opening [1] is not an error per se. [1] was
> introduced in Linux 2.6.28 but epoll is available since
> 2.5.44. Hence, goto end and set a default value without
> setting error return value.
>
> [1] /proc/sys/fs/epoll/max_user_watches
>
> Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
> ---
>  src/common/compat/compat-epoll.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/src/common/compat/compat-epoll.c b/src/common/compat/compat-epoll.c
> index dbaf6823..6a781c7a 100644
> --- a/src/common/compat/compat-epoll.c
> +++ b/src/common/compat/compat-epoll.c
> @@ -301,7 +301,15 @@ int compat_epoll_set_max_size(void)
>
>         fd = open(COMPAT_EPOLL_PROC_PATH, O_RDONLY);
>         if (fd < 0) {
> -               retval = -1;
> +               /*
> +                * Failing on opening [1] is not an error per see. [1] was
> +                * introduced in Linux 2.6.28 but epoll is available since
> +                * 2.5.44. Hence, goto end and set a default value without
> +                * setting an error return value.
> +                *
> +                * [1] /proc/sys/fs/epoll/max_user_watches
> +                */
> +               retval = 0;
>                 goto end;
>         }
>
> --
> 2.11.0
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH lttng-tools v2] Fix: COMPAT_EPOLL_PROC_PATH is available from Linux 2.6.28
@ 2017-05-09 19:46 Jonathan Rajotte
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Rajotte @ 2017-05-09 19:46 UTC (permalink / raw)
  To: lttng-dev; +Cc: jgalar

v2: Typo in commit message "per see" -> "per se"

Failing on opening [1] is not an error per se. [1] was
introduced in Linux 2.6.28 but epoll is available since
2.5.44. Hence, goto end and set a default value without
setting error return value.

[1] /proc/sys/fs/epoll/max_user_watches

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
---
 src/common/compat/compat-epoll.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/common/compat/compat-epoll.c b/src/common/compat/compat-epoll.c
index dbaf6823..6a781c7a 100644
--- a/src/common/compat/compat-epoll.c
+++ b/src/common/compat/compat-epoll.c
@@ -301,7 +301,15 @@ int compat_epoll_set_max_size(void)
 
 	fd = open(COMPAT_EPOLL_PROC_PATH, O_RDONLY);
 	if (fd < 0) {
-		retval = -1;
+		/*
+		 * Failing on opening [1] is not an error per see. [1] was
+		 * introduced in Linux 2.6.28 but epoll is available since
+		 * 2.5.44. Hence, goto end and set a default value without
+		 * setting an error return value.
+		 *
+		 * [1] /proc/sys/fs/epoll/max_user_watches
+		 */
+		retval = 0;
 		goto end;
 	}
 
-- 
2.11.0

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-11 14:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20170509194635.18701-1-jonathan.rajotte-julien@efficios.com>
2017-05-11 14:45 ` [PATCH lttng-tools v2] Fix: COMPAT_EPOLL_PROC_PATH is available from Linux 2.6.28 Jérémie Galarneau
2017-05-09 19:46 Jonathan Rajotte

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.