Re: 2.6.25-rc9 -- INFO: possible circular locking dependencydetected

From: Heiko Carstens
Date: Mon Apr 14 2008 - 03:02:49 EST


On Mon, Apr 14, 2008 at 08:54:05AM +0200, Peter Zijlstra wrote:
> Fun,
>
> I will need to sort out this code before I can say anything about that,
> perhaps Gautham and or Rafael have ideas before I can come up with
> something.. ?

Why not simply removing the get/put_online_cpus() pair in sched_getaffinity?
It's superfluous since we have already a read_lock/read_unlock pair there
which does disable/enable cpu hotplug anyway.

Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
---
kernel/sched.c | 3 ---
1 file changed, 3 deletions(-)

Index: linux-2.6/kernel/sched.c
===================================================================
--- linux-2.6.orig/kernel/sched.c
+++ linux-2.6/kernel/sched.c
@@ -4873,7 +4873,6 @@ long sched_getaffinity(pid_t pid, cpumas
struct task_struct *p;
int retval;

- get_online_cpus();
read_lock(&tasklist_lock);

retval = -ESRCH;
@@ -4889,8 +4888,6 @@ long sched_getaffinity(pid_t pid, cpumas

out_unlock:
read_unlock(&tasklist_lock);
- put_online_cpus();
-
return retval;
}

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