Messages in this thread | | | Date | Tue, 4 Aug 2009 19:19:05 +0200 | From | Oleg Nesterov <> | Subject | Re: [PATCH 3/2 -v3] fcntl: F_[SG]ETOWN_EX |
| |
On 08/04, Peter Zijlstra wrote: > > On Tue, 2009-08-04 at 18:20 +0200, Oleg Nesterov wrote: > > > > + rcu_read_lock(); > > > + pid = find_vpid(owner.pid); > > > + ret = __f_setown(filp, pid, type, 1); > > > + rcu_read_unlock(); > > > + > > > + return ret; > > > > Perhaps it makes sense to return -ESRCH if owner.pid && !pid, not > > sure. > > We'd need that case to unset/clear the owner, so returning -ESRCH might > confuse users I think.
Agreed. Perhaps we should do nothing but return -ESRCH if user passes owner->pid != 0 and it is not valid.
But this is minor and can be tweaked later. (and to clarify again, not that I really think we should do this, just a random thought).
> How about the below delta, it changes send_sigurg_to_task() to also use > do_send_sig_info() which looses the check_kill_permission() check, but > your previous changes lost that same thing from SIGIO -- so I'm hoping > that's ok.
Yes, I think this is fine!
Oleg.
| |