Messages in this thread | | | Date | Fri, 11 Nov 2005 01:32:27 +0100 | From | "Magnus Naeslund(f)" <> | Subject | Re: [PATCH] getrusage sucks |
| |
Claudio Scordino wrote: > On Friday 11 November 2005 00:47, Hua Zhong (hzhong) wrote: > >>The reason is what if tsk is no longer available when you call >>getrusage? > > > Sorry, but honestly I don't see any problem: as you can see from my patch, if > tsk is no longer available, getrusage returns -1 and sets errno appropriately > (equal to EINVAL, which means that who is invalid). > > Claudio >
You need to wrap this with a read_lock(&tasklist_lock) to be safe, I think.
Regards, Magnus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |