Re: [PATCH 5/5] file: Modify struct fown_struct to contain a tref

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

 



Suleiman Souhlal <[email protected]> writes:

> Eric W. Biederman wrote:
>
>> @@ -317,7 +326,9 @@ static long do_fcntl(int fd, unsigned in
>>  		 * current syscall conventions, the only way
>>  		 * to fix this will be in libc.
>>  		 */
>> -		err = filp->f_owner.pid;
>> +		err = 0;
>> +		if (filp->f_owner.tref->task)
>> +			err = filp->f_owner.pid;
>
> Probably not very important, but why don't you use
> filp->f_owner.tref->task->pid? This way you could completely get rid of the pid
> field in fown_struct.

Two reasons.
One because task->pid is not the proper value for a thread group.
And because task might be NULL.

Basically using filp->f_owner.tref->task->pid as my source is a much
more complicated expression.

Eric
-
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