Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eda4f9b7 authored by J. Bruce Fields's avatar J. Bruce Fields Committed by Trond Myklebust
Browse files

sunrpc: rpc_pipe_poll may miss available data in some cases



Pipe messages start out life on a queue on the inode, but when first
read they're moved to the filp's private pointer.  So it's possible for
a poll here to return null even though there's a partially read message
available.

Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent ef338bee
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ rpc_pipe_poll(struct file *filp, struct poll_table_struct *wait)
	mask = POLLOUT | POLLWRNORM;
	if (rpci->ops == NULL)
		mask |= POLLERR | POLLHUP;
	if (!list_empty(&rpci->pipe))
	if (filp->private_data || !list_empty(&rpci->pipe))
		mask |= POLLIN | POLLRDNORM;
	return mask;
}