lkml.org 
[lkml]   [2004]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [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/
\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.034 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site