From: Matthew Wilcox <matthew@wil.cx>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Linus Torvalds <torvalds@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [RFC] TASK_KILLED
Date: Thu, 30 Aug 2007 08:51:53 -0600 [thread overview]
Message-ID: <20070830145153.GT14130@parisc-linux.org> (raw)
In-Reply-To: <1188479497.6755.12.camel@heimdal.trondhjem.org>
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."
prev parent reply other threads:[~2007-08-30 14:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-29 20:40 [RFC] TASK_KILLED Matthew Wilcox
2007-08-30 4:38 ` Linus Torvalds
2007-08-30 13:11 ` Trond Myklebust
2007-08-30 14:51 ` Matthew Wilcox [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070830145153.GT14130@parisc-linux.org \
--to=matthew@wil.cx \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=trond.myklebust@fys.uio.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox