Commit d324810a authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for-linus-2019-11-21' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux

Pull pidfd fixlet from Christian Brauner:
 "This contains a simple fix for the pidfd poll method. In the original
  patchset pidfd_poll() was made to return an unsigned int. However, the
  poll method is defined to return a __poll_t. While the unsigned int is
  not a huge deal it's just nicer to return a __poll_t.

  I've decided to send it right before the 5.4 release mainly so that
  stable doesn't need to backport it to both 5.4 and 5.3"

* tag 'for-linus-2019-11-21' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
  fork: fix pidfd_poll()'s return type
parents c74386d5 9e77716a
...@@ -1708,11 +1708,11 @@ static void pidfd_show_fdinfo(struct seq_file *m, struct file *f) ...@@ -1708,11 +1708,11 @@ static void pidfd_show_fdinfo(struct seq_file *m, struct file *f)
/* /*
* Poll support for process exit notification. * Poll support for process exit notification.
*/ */
static unsigned int pidfd_poll(struct file *file, struct poll_table_struct *pts) static __poll_t pidfd_poll(struct file *file, struct poll_table_struct *pts)
{ {
struct task_struct *task; struct task_struct *task;
struct pid *pid = file->private_data; struct pid *pid = file->private_data;
int poll_flags = 0; __poll_t poll_flags = 0;
poll_wait(file, &pid->wait_pidfd, pts); poll_wait(file, &pid->wait_pidfd, pts);
...@@ -1724,7 +1724,7 @@ static unsigned int pidfd_poll(struct file *file, struct poll_table_struct *pts) ...@@ -1724,7 +1724,7 @@ static unsigned int pidfd_poll(struct file *file, struct poll_table_struct *pts)
* group, then poll(2) should block, similar to the wait(2) family. * group, then poll(2) should block, similar to the wait(2) family.
*/ */
if (!task || (task->exit_state && thread_group_empty(task))) if (!task || (task->exit_state && thread_group_empty(task)))
poll_flags = POLLIN | POLLRDNORM; poll_flags = EPOLLIN | EPOLLRDNORM;
rcu_read_unlock(); rcu_read_unlock();
return poll_flags; return poll_flags;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment