Re: [PATCH 3/2 -v3] fcntl: F_[SG]ETOWN_EX

From: Oleg Nesterov
Date: Tue Aug 04 2009 - 13:23:19 EST


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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/