* Re: A fix for futex patch
[not found] <OFE0524400.39220EE3-ON85256BF4.0057F3F7@raleigh.ibm.com>
@ 2002-07-13 3:26 ` Rusty Russell
0 siblings, 0 replies; only message in thread
From: Rusty Russell @ 2002-07-13 3:26 UTC (permalink / raw)
To: Saurabh Desai; +Cc: torvalds, bcrl, linux-kernel, trivial
In message <OFE0524400.39220EE3-ON85256BF4.0057F3F7@raleigh.ibm.com> you write:
> I looked in latest 2.5.25 futex.c and at line # 278, the f_owner.pid is
> back to "current->pid".
> Last month, I'd send you this fix to work correctly with cloned task.
> I thought at one point you had changed this to "current->tgid", and now
> it's back to pid.
> The pid should be tgid to work for all cases.
Oops. Good catch. My mistake.
Linus, "getpid()" returns "tgid" not "pid", so this is correct.
Thanks!
Rusty.
diff -urN -I $.*$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.25/kernel/futex.c working-2.5.25-futex/kernel/futex.c
--- linux-2.5.25/kernel/futex.c Fri Jun 21 09:41:56 2002
+++ working-2.5.25-futex/kernel/futex.c Sat Jul 13 13:24:43 2002
@@ -275,7 +275,7 @@
filp->f_dentry = dget(futex_dentry);
if (signal) {
- filp->f_owner.pid = current->pid;
+ filp->f_owner.pid = current->tgid;
filp->f_owner.uid = current->uid;
filp->f_owner.euid = current->euid;
filp->f_owner.signum = signal;
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
^ permalink raw reply [flat|nested] only message in thread