Messages in this thread Patch in this message | | | Subject | Re: [Bugme-new] [Bug 9906] New: Weird hang with NPTL and SIGPROF. | From | Frank Mayhar <> | Date | Fri, 07 Mar 2008 16:01:37 -0800 |
| |
On Fri, 2008-03-07 at 15:26 -0800, Frank Mayhar wrote: > Based on Roland's comments and from reading the source, I have a > possible fix. I'm posting the attached patch _not_ for submission but > _only_ for comment. For one thing it's based on 2.6.18.5 and for > another it hasn't had much testing yet. I wanted to get it out here for > comment, though, in case anyone can see where I might have gone wrong. > Comments, criticism and (especially!) testing enthusiastically > requested.
The previous email was missing one small part of the patch, reproduced below. Remain calm. ----------------------------------BEGIN------------------------------------ diff -urp /home/fmayhar/Static/linux-2.6.18.5/kernel/compat.c linux-2.6.18.5/kernel/compat.c --- /home/fmayhar/Static/linux-2.6.18.5/kernel/compat.c 2006-12-01 16:13:05.000000000 -0800 +++ linux-2.6.18.5/kernel/compat.c 2008-03-06 17:26:21.000000000 -0800 @@ -161,18 +161,11 @@ asmlinkage long compat_sys_times(struct if (tbuf) { struct compat_tms tmp; struct task_struct *tsk = current; - struct task_struct *t; cputime_t utime, stime, cutime, cstime; read_lock(&tasklist_lock); - utime = tsk->signal->utime; - stime = tsk->signal->stime; - t = tsk; - do { - utime = cputime_add(utime, t->utime); - stime = cputime_add(stime, t->stime); - t = next_thread(t); - } while (t != tsk); + utime = tsk->signal->shared_utime; + stime = tsk->signal->shared_stime; /* * While we have tasklist_lock read-locked, no dying thread -----------------------------------END------------------------------------- -- Frank Mayhar <fmayhar@google.com> Google, Inc.
| |