Re: [syzbot] [netfs?] INFO: task hung in netfs_unbuffered_write_iter
From: Oleg Nesterov
Date: Wed Mar 26 2025 - 08:45:02 EST
On 03/26, Oleg Nesterov wrote:
>
> Hmm... I don't understand why the 2nd vfs_poll(ts->wr) depends on the
> ret from vfs_poll(ts->rd), but I assume this is correct.
I meant, if pt != NULL and ts->rd != ts->wr we need both
vfs_poll(ts->rd) and vfs_poll(ts->wr) ?
and the reproducer writes to the pipe before it mounts 9p...
Prateek, this is just a shot in the dark but since you can reproduce,
can you check if the patch below makes any difference?
Oleg.
--- x/net/9p/trans_fd.c
+++ x/net/9p/trans_fd.c
@@ -234,8 +234,10 @@ p9_fd_poll(struct p9_client *client, str
}
ret = vfs_poll(ts->rd, pt);
- if (ts->rd != ts->wr)
+ if (ts->rd != ts->wr) {
+ if (pt != NULL) vfs_poll(ts->wr, pt);
ret = (ret & ~EPOLLOUT) | (vfs_poll(ts->wr, pt) & ~EPOLLIN);
+ }
return ret;
}