Re: [RFC] TASK_KILLED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux