From 9de5fc359e58ef4e7244b6f47e07ca4ddec4ef4a Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Fri, 23 Aug 2002 13:58:36 -0700 Subject: [PATCH] [CLONE_*TID]: Make tsk->user_tid and int so that 64-bit arches work. - futex uses int as its atomic word type, we pass in user_tid to the futex routines, so the types must match --- arch/i386/kernel/process.c | 2 +- include/linux/sched.h | 2 +- kernel/fork.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index 869d2533ae0b..11356352f405 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c @@ -625,7 +625,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp, * Does the userspace VM want the TID cleared on mm_release()? */ if (clone_flags & CLONE_CLEARTID) - p->user_tid = (long *) childregs->edx; + p->user_tid = (int *) childregs->edx; return 0; } diff --git a/include/linux/sched.h b/include/linux/sched.h index 5afeecb164b9..8335c0df1d41 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -309,7 +309,7 @@ struct task_struct { wait_queue_head_t wait_chldexit; /* for wait4() */ struct completion *vfork_done; /* for vfork() */ - long *user_tid; /* for CLONE_CLEARTID */ + int *user_tid; /* for CLONE_CLEARTID */ unsigned long rt_priority; unsigned long it_real_value, it_prof_value, it_virt_value; diff --git a/kernel/fork.c b/kernel/fork.c index f13f6ae9e457..491079bcf5cc 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -377,7 +377,7 @@ void mm_release(void) * We dont check the error code - if userspace has * not set up a proper pointer then tough luck. */ - put_user(0UL, tsk->user_tid); + put_user(0, tsk->user_tid); sys_futex(tsk->user_tid, FUTEX_WAKE, 1, NULL); } } -- 2.39.5