Re: [PATCH] shift current_cred() from __f_setown() to f_modown()

Oleg Nesterov
2009-06-16T21:05:49Z

On 06/16, Linus Torvalds wrote:
>
>
> On Tue, 16 Jun 2009, Oleg Nesterov wrote:
> >
> > Shift current_cred() from __f_setown() to f_modown(). This reduces
> > the number of arguments and saves 48 bytes from fs/fcntl.o.
>
> Ok, I know I asked for this, but now I suddenly start worrying about
> whether f_owner.uid/euid are initialized at all for the pid==NULL case?
>
> They used to be initialized to zero, now they are left alone. Are they
> initialized somewhere else earlier?

I think this is fine, but I should have mentioned this in the changelog.

If f_owner.pid == NULL we never use f_owner.uid/euid. Otherwise we have
a bug anyway: we must not send signals if pid was reset to NULL.

Oleg.