Unverified Commit 6fb74cb6 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!3849 pipe: Fix endless sleep problem due to the out-of-order

parents 8a9ec5bf ccd366f0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -672,8 +672,10 @@ pipe_poll(struct file *filp, poll_table *wait)
	 * if something changes and you got it wrong, the poll
	 * table entry will wake you up and fix it.
	 */
	spin_lock_irq(&pipe->rd_wait.lock);
	head = READ_ONCE(pipe->head);
	tail = READ_ONCE(pipe->tail);
	spin_unlock_irq(&pipe->rd_wait.lock);

	mask = 0;
	if (filp->f_mode & FMODE_READ) {