Skip to contentSkip to conversation

use correct wakeups in fs/pipe.c

PATCH In review Manfred Spraul 3 participants 4 messages Oct 19, 2002 – Oct 20, 2002 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 use correct wakeups in fs/pipe.c

wake_up_interruptible() and _sync() calls are reversed in pipe_read().

The attached patches only calls _sync if a schedule() call follows.

--
Manfred

fs/pipe.c +2 -2
@@ -109,7 +109,7 @@
 			break;
 		}
 		if (do_wakeup) {
-			wake_up_interruptible(PIPE_WAIT(*inode));
+			wake_up_interruptible_sync(PIPE_WAIT(*inode));
  			kill_fasync(PIPE_FASYNC_WRITERS(*inode), SIGIO, POLL_OUT);
 		}
 		pipe_wait(inode);
@@ -117,7 +117,7 @@
 	up(PIPE_SEM(*inode));
 	/* Signal writers asynchronously that there is more room.  */
 	if (do_wakeup) {
-		wake_up_interruptible_sync(PIPE_WAIT(*inode));
+		wake_up_interruptible(PIPE_WAIT(*inode));
 		kill_fasync(PIPE_FASYNC_WRITERS(*inode), SIGIO, POLL_OUT);
 	}
 	if (ret > 0)
#1 lore raw
Quoted 4 lines · --On Saturday, October 19, 2002 20:12:42 +0200 Manfred Spraul…

wake_up_interruptible() and _sync() calls are reversed in pipe_read().

The attached patches only calls _sync if a schedule() call follows.

FYI. This patch fixes a hang on pipetest.c with the --epoll option.

Thanks!

Hanna

#2 lore raw
Quoted 8 lines · Hanna Linder
Quoted 4 lines · --On Saturday, October 19, 2002 20:12:42 +0200 Manfred Spraul…

wake_up_interruptible() and _sync() calls are reversed in pipe_read().

The attached patches only calls _sync if a schedule() call follows.

FYI. This patch fixes a hang on pipetest.c with the --epoll option.

Hanna, I'm not sure if your port of the epoll pipe code on 2.5.44 is correct. That fix shouldn't affect epoll. Try the code I sent you yesterday or today, it working fine on my machine without the fix.

- Davide

#3 lore raw
Quoted 6 lines · --On Sunday, October 20, 2002 16:49:24 -0700 Davide Libenzi…
Quoted 4 lines · Hanna Linder
Quoted 2 lines · --On Saturday, October 19, 2002 20:12:42 +0200 Manfred Spraul…

wake_up_interruptible() and _sync() calls are reversed in pipe_read().

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

The attached patches only calls _sync if a schedule() call follows.

FYI. This patch fixes a hang on pipetest.c with the --epoll option.

Hanna, I'm not sure if your port of the epoll pipe code on 2.5.44 is correct. That fix shouldn't affect epoll. Try the code I sent you yesterday or today, it working fine on my machine without the fix.

You are right. I had changed pipetest.c in all my debugging earlier and used the original version of pipetest.c with your new patch and Manfreds, which worked. I will be more carefull in the future.

Thanks.

Hanna