Messages in this thread Patch in this message | | | Date | Mon, 13 Sep 2004 17:21:20 -0700 | From | Roland McGrath <> | Subject | Re: [PATCH] exec: fix posix-timers leak and pending signal loss |
| |
> The patch comes at an awkward time - I'd prefer that the leak fix be merged > up immediately, but the rest appears less serious. And you're playing in > an area which likes to explode in our faces.
Frankly, I think the old code is much more prone to unforeseen problems than the new.
> Had you not rolled three distinct patches into one (hint) I'd have > forwarded along the leak fix and sat on the rest for post-2.6.9.
I don't like being an enabler of bad code. So I didn't do a separate fix inside something that I already knew needed to be ripped out. If you want an untested minimal fix for just the leak potential, leaving the semantics frotzed in multiple ways, you can try the following.
Index: linux-2.6/exec.c =================================================================== RCS file: /home/roland/redhat/bkcvs/linux-2.5/fs/exec.c,v retrieving revision 1.138 diff -u -b -B -p -r1.138 exec.c --- linux-2.6/exec.c 27 Aug 2004 17:36:15 -0000 1.138 +++ linux-2.6/exec.c 14 Sep 2004 00:19:43 -0000 @@ -741,8 +741,10 @@ no_thread_group: spin_unlock(&oldsighand->siglock); write_unlock_irq(&tasklist_lock); - if (newsig && atomic_dec_and_test(&oldsig->count)) + if (newsig && atomic_dec_and_test(&oldsig->count)) { + exit_itimers(oldsig); kmem_cache_free(signal_cachep, oldsig); + } if (atomic_dec_and_test(&oldsighand->count)) kmem_cache_free(sighand_cachep, oldsighand); - 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/
| |