From: George Anzinger <george@mvista.com>
To: Gerd Knorr <kraxel@suse.de>, Andrew Morton <akpm@osdl.org>,
Roland McGrath <roland@redhat.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] Re: 2.6.12: itimer_real timers don't survive execve() any more
Date: Thu, 04 Aug 2005 14:22:15 -0700 [thread overview]
Message-ID: <42F28707.7060806@mvista.com> (raw)
In-Reply-To: <20050804164532.GB31853@bytesex>
[-- Attachment #1: Type: text/plain, Size: 324 bytes --]
Gerd Knorr wrote:
> Hi,
>
> Somewhere between 2.6.11 and 2.6.12 the regression in $subject
> was added to the linux kernel. Testcase below.
Yep. The itimer changes got a bit carried away. Here is a fix.
--
George Anzinger george@mvista.com
HRT (High-res-timers): http://sourceforge.net/projects/high-res-timers/
[-- Attachment #2: itimer-fix2.patch --]
[-- Type: text/plain, Size: 1316 bytes --]
Source: MontaVista Software, Inc. George Anzinger <george@mvista.com>
Type: Defect Fix
Description:
The changes to itimer of late (after 2.6.11) cause itimers not
to survive the exec* calls. Standard says they should.
Signed-off-by: George Anzinger<george@mvista.com>
exit.c | 1 +
posix-timers.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
Index: linux-2.6.13-rc/kernel/exit.c
===================================================================
--- linux-2.6.13-rc.orig/kernel/exit.c
+++ linux-2.6.13-rc/kernel/exit.c
@@ -794,6 +794,7 @@ fastcall NORET_TYPE void do_exit(long co
}
tsk->flags |= PF_EXITING;
+ del_timer_sync(&tsk->signal->real_timer);
/*
* Make sure we don't try to process any timer firings
Index: linux-2.6.13-rc/kernel/posix-timers.c
===================================================================
--- linux-2.6.13-rc.orig/kernel/posix-timers.c
+++ linux-2.6.13-rc/kernel/posix-timers.c
@@ -1183,10 +1183,10 @@ void exit_itimers(struct signal_struct *
struct k_itimer *tmr;
while (!list_empty(&sig->posix_timers)) {
- tmr = list_entry(sig->posix_timers.next, struct k_itimer, list);
+ tmr = list_entry(sig->posix_timers.next,
+ struct k_itimer, list);
itimer_delete(tmr);
}
- del_timer_sync(&sig->real_timer);
}
/*
next prev parent reply other threads:[~2005-08-04 21:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-04 16:45 2.6.12: itimer_real timers don't survive execve() any more Gerd Knorr
2005-08-04 21:22 ` George Anzinger [this message]
2005-08-04 21:34 ` [PATCH] " Roland McGrath
2005-08-04 22:02 ` Andrew Morton
2005-08-04 22:10 ` George Anzinger
2005-08-05 8:44 ` Gerd Knorr
2005-08-05 15:33 ` George Anzinger
2005-08-05 22:10 ` Roland McGrath
2005-08-06 0:50 ` George Anzinger
2005-08-04 21:37 ` 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=42F28707.7060806@mvista.com \
--to=george@mvista.com \
--cc=akpm@osdl.org \
--cc=kraxel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).