Re: [RFC] Per-thread getrusage

From: Eric W. Biederman
Date: Mon Jan 28 2008 - 15:45:39 EST


Pavel Emelyanov <xemul@xxxxxxxxxx> writes:
>> ...
>> +asmlinkage long sys_thread_getrusage(int tid, struct rusage __user *ru)
>> +{
>> + struct task_struct *tsk;
>> + tsk = find_task_by_pid(tid);
>> + return getrusage(tsk, RUSAGE_THREAD, ru);
>> +}
>
> Well, the find_task_by_pid() is really wrong here.

And find_task_by_pid should probably just be removed.

No need to provide function with the gun firmly pointed at our feet....

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