BUG in shared_policy_replace() ?

From: Steve Longerbeam
Date: Tue Jan 18 2005 - 19:33:19 EST


Hi Andi,

Why free the shared policy created to split up an old
policy that spans the whole new range? Ie, see patch.

Steve --- mm/mempolicy.c.orig 2005-01-18 16:13:35.573273351 -0800
+++ mm/mempolicy.c 2005-01-18 16:24:23.940608135 -0800
@@ -1052,10 +1052,6 @@
if (new)
sp_insert(sp, new);
spin_unlock(&sp->lock);
- if (new2) {
- mpol_free(new2->policy);
- kmem_cache_free(sn_cache, new2);
- }
return 0;
}