lkml.org 
[lkml]   [2009]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Q: PTRACE_ATTACH && -EINTR
On 06/08, Roland McGrath wrote:
>
> > Or even -ERESTARTNOINTR ? Or just mutex_lock() ?
>
> -ERESTARTNOINTR is right.
>
> There is nothing wrong with making it interruptible, and that might help
> something or other overall, or even be important to avoid a deadlock or
> something in some strange situation.

Agreed.

> But since the call could never return
> -EINTR before, we can't make it start now.

Yes. -EINTR just wrong.

> > Or ignore this problem since nobody complained?
>
> There has barely been time for anyone to do something strange enough to hit
> it, and they would probably not have realized what was going on even if it
> did hit. We know we broke the ABI contract, we have to fix it.
>
> Note that every use of mutex_lock_interruptible and also down_interruptible
> can return -EINTR. This means these really should never be used in the way
> where their return value is returned directly from some system call. Every
> user-visible call that gets interrupted needs to return some -ERESTART*
> code and never -EINTR directly.

Sure. And we have other users of mutex_lock_interruptible() which deserve
a fix.

As for ->cred_exec_mutex, I think do_execve() needs a fix as well.

It was renamed in -next. Should I send these fixes now for 2.6.20, or we can
wait for 2.6.31 ?

Oleg.



\
 
 \ /
  Last update: 2009-06-08 20:43    [W:0.065 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site