[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070830145153.GT14130@parisc-linux.org>
Date: Thu, 30 Aug 2007 08:51:53 -0600
From: Matthew Wilcox <matthew@....cx>
To: Trond Myklebust <trond.myklebust@....uio.no>
Cc: Linus Torvalds <torvalds@...l.org>, linux-kernel@...r.kernel.org
Subject: Re: [RFC] TASK_KILLED
On Thu, Aug 30, 2007 at 09:11:37AM -0400, Trond Myklebust wrote:
> > diff --git a/fs/read_write.c b/fs/read_write.c
> > index 507ddff..29e3f21 100644
> > --- a/fs/read_write.c
> > +++ b/fs/read_write.c
> > @@ -220,7 +220,7 @@ Einval:
> >
> > static void wait_on_retry_sync_kiocb(struct kiocb *iocb)
> > {
> > - set_current_state(TASK_UNINTERRUPTIBLE);
> > + set_current_state(TASK_KILLABLE);
> > if (!kiocbIsKicked(iocb))
> > schedule();
> > else
>
> Won't this change just cause functions like do_sync_read() and
> do_sync_write() to loop forever when you kill the process?
Indeed. I didn't intend to include this hunk because I hadn't tested
it -- I've not seen a task get stuck there. In trying to fix it, I
noticed that the sync_page_killable() is inadequate -- it'll return -EIO
for any signal, not just a fatal one. Sure, other signals won't wake
it, but if they're pending, it'll do the wrong thing. Fixed patch
coming up ... just as soon as I find out what other bug I've introduced.
--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists