]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fork: fix pidfd_poll()'s return type
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Wed, 20 Nov 2019 00:33:20 +0000 (01:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Nov 2019 09:07:43 +0000 (10:07 +0100)
commitced2c60d2e29fa075d2bc77dd24d298c11cffa53
tree2d41601b6dc2ac4e6f1b98788c43e96096458f3e
parentde816751bd86fec28ef832c06b7c3cf535d13b9d
fork: fix pidfd_poll()'s return type

commit 9e77716a75bc6cf54965e5ec069ba7c02b32251c upstream.

pidfd_poll() is defined as returning 'unsigned int' but the
.poll method is declared as returning '__poll_t', a bitwise type.

Fix this by using the proper return type and using the EPOLL
constants instead of the POLL ones, as required for __poll_t.

Fixes: b53b0b9d9a61 ("pidfd: add polling support")
Cc: Joel Fernandes (Google) <joel@joelfernandes.org>
Cc: stable@vger.kernel.org # 5.3
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
Link: https://lore.kernel.org/r/20191120003320.31138-1-luc.vanoostenryck@gmail.com
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/fork.c