lkml.org 
[lkml]   [2005]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] xfrm_policy destructor fix
On Fri, 25 Mar 2005 15:34:41 +0100
Ingo Molnar <mingo@elte.hu> wrote:

> the patch below fixes a bug that i encountered while running a
> PREEMPT_RT kernel, but i believe it should be fixed in the generic
> kernel too. xfrm_policy_kill() queues a destroyed policy structure to
> the GC list, and unlocks the policy->lock spinlock _after_ that point.
> This created a scenario where GC processing got to the new structure
> first, and kfree()d it - then the write_unlock_bh() was done on the
> already kfreed structure. There is no guarantee that GC processing will
> be done after policy->lock has been dropped and softirq processing has
> been enabled.
>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>

Good catch Ingo, patch applied. Thanks.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-06 13:30    [W:0.279 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site