We must never pass NULL to f->poll(). Instead, we reset the callback to
NULL, thus the poll function will never add more queues.
We already do this via init_poll_funcptr(&xyz, NULL) so we can safely pass
the poll context everytime. This also allows us to drop the first dummy
call to ->poll().
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
fput(cancel_fd);
return -EINVAL;
}
-
- cancel_fd->f_op->poll(cancel_fd, &pwq.pt);
}
sigmask_item = kdbus_items_get(cmd_send->items,
if (cancel_fd) {
unsigned int r;
- r = cancel_fd->f_op->poll(cancel_fd, NULL);
+ r = cancel_fd->f_op->poll(cancel_fd, &pwq.pt);
if (r & POLLIN) {
ret = -ECANCELED;
break;