From: Roland McGrath <roland@redhat.com>
To: Andrew Morton <akpm@osdl.org>
Cc: torvalds@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] exec: fix posix-timers leak and pending signal loss
Date: Mon, 13 Sep 2004 17:21:20 -0700 [thread overview]
Message-ID: <200409140021.i8E0LKcB030581@magilla.sf.frob.com> (raw)
In-Reply-To: Andrew Morton's message of Monday, 13 September 2004 16:26:45 -0700 <20040913162645.448e6131.akpm@osdl.org>
> 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);
next prev parent reply other threads:[~2004-09-14 0:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-11 7:59 Roland McGrath
2004-09-13 23:26 ` Andrew Morton
2004-09-14 0:21 ` Roland McGrath [this message]
2004-09-14 0:26 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200409140021.i8E0LKcB030581@magilla.sf.frob.com \
--to=roland@redhat.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®