Subject: Re: [PATCH] 9p/trans_fd: always use O_NONBLOCK read/write

From: Dominique Martinet <[email-masked]>
Date: Fri, 7 Oct 2022 10:03:59 +0900

Christian Schoenebeck wrote on Thu, Oct 06, 2022 at 04:55:23PM +0200:
> > diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
> > index e758978b44be..9870597da583 100644
> > --- a/net/9p/trans_fd.c
> > +++ b/net/9p/trans_fd.c
> > @@ -821,11 +821,13 @@ static int p9_fd_open(struct p9_client *client, int
> > rfd, int wfd) goto out_free_ts;
> >  	if (!(ts->rd->f_mode & FMODE_READ))
> >  		goto out_put_rd;
> > +	ts->rd->f_flags |= O_NONBLOCK;
> 
> ... I think this deserves a short comment like:
> 
>     /* prevent hung task with pipes */

Good point, I've sneaked in this comment:
    /* prevent workers from hanging on IO when fd is a pipe */

https://github.com/martinetd/linux/commit/ef575281b21e9a34dfae544a187c6aac2ae424a9

> Reviewed-by: Christian Schoenebeck <[email-masked]>

Thank you!

--
Dominique