From: Linus Torvalds <torvalds@osdl.org>
To: Tejun Huh <tejun@aratech.co.kr>
Cc: Ingo Molnar <mingo@elte.hu>, <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@digeo.com>
Subject: Re: [PATCH] Race condition in del_timer_sync (2.5)
Date: Tue, 2 Sep 2003 00:55:29 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.44.0309020054080.9731-100000@home.osdl.org> (raw)
In-Reply-To: <20030902075423.GA4640@atj.dyndns.org>
On Tue, 2 Sep 2003, Tejun Huh wrote:
>
> I'll submit the patch to Linus soon.
I actually already committed it to my tree, since everybody seems to agree
on it...
Linus
----
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1412 -> 1.1413
# kernel/timer.c 1.66 -> 1.67
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/09/02 torvalds@home.osdl.org 1.1413
# Fix del_timer_sync() SMP memory ordering (from Tejun Huh <tejun@aratech.co.kr>)
#
# From Tejun's posting:
# >
# > This patch fixes a race between del_timer_sync and recursive timers.
# > Current implementation allows the value of timer->base that is used
# > for timer_pending test to be fetched before finishing running_timer
# > test, so it's possible for a recursive time to be pending after
# > del_timer_sync. Adding smp_rmb before timer_pending removes the race.
# --------------------------------------------
#
diff -Nru a/kernel/timer.c b/kernel/timer.c
--- a/kernel/timer.c Tue Sep 2 00:55:15 2003
+++ b/kernel/timer.c Tue Sep 2 00:55:15 2003
@@ -338,6 +338,7 @@
break;
}
}
+ smp_rmb();
if (timer_pending(timer))
goto del_again;
prev parent reply other threads:[~2003-09-02 7:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-02 2:59 [PATCH] Race condition in del_timer_sync (2.5) Tejun Huh
2003-09-02 6:33 ` Ingo Molnar
2003-09-02 7:54 ` Tejun Huh
2003-09-02 7:55 ` Linus Torvalds [this message]
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=Pine.LNX.4.44.0309020054080.9731-100000@home.osdl.org \
--to=torvalds@osdl.org \
--cc=akpm@digeo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tejun@aratech.co.kr \
/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).