Re: [PATCH 2.6.12-rc4: resent] cpuset exit NULL dereference fix

From: Simon Derr
Date: Fri May 27 2005 - 04:36:24 EST


On Fri, 27 May 2005, Paul Jackson wrote:

> Andrew,
>
> Resubmitting the same patch I submitted yesterday. Simon Derr
> and I agree that we need this patch now to fix a kernel crash.
>
> The potential scaling issues are theoretical at this time.
> When they become more real, we will be in a better position to
> consider more ambitious changes to cpuset locking and reference
> counting.
>
> Meanwhile -- this patch is small, simple, and needed.
>
> ===
>
> There is a race in the kernel cpuset code, between the code
> to handle notify_on_release, and the code to remove a cpuset.
> The notify_on_release code can end up trying to access a
> cpuset that has been removed. In the most common case, this
> causes a NULL pointer dereference from the routine cpuset_path.
> However all manner of bad things are possible, in theory at least.

> Signed-off-by: Paul Jackson <pj@xxxxxxx>
>
> Index: 2.6-cpuset_path_fix/kernel/cpuset.c
> ===================================================================
> --- 2.6-cpuset_path_fix.orig/kernel/cpuset.c 2005-05-25 19:20:27.000000000 -0700
> +++ 2.6-cpuset_path_fix/kernel/cpuset.c 2005-05-26 00:50:32.000000000 -0700

OK for me.

Acked-by: Simon Derr <simon.derr@xxxxxxxx>

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