Re: [PATCH] Fixes for RCU handling of task_struct

From: Andrew Morton
Date: Mon Oct 31 2005 - 23:52:15 EST


Ingo Molnar <mingo@xxxxxxx> wrote:
>
> @@ -1433,7 +1485,16 @@ send_group_sigqueue(int sig, struct sigq
> int ret = 0;
>
> BUG_ON(!(q->flags & SIGQUEUE_PREALLOC));
> - read_lock(&tasklist_lock);
> +
> + while(!read_trylock(&tasklist_lock)) {
> + if (!p->sighand)
> + return -1;
> + cpu_relax();
> + }

This looks kind of ugly and quite unobvious.

What's going on there?
-
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/