Gentoo Archives: gentoo-commits

From: "Richard Yao (ryao)" <ryao@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-kernel/spl/files: spl-0.6.1-fix-delay.patch
Date: Tue, 28 May 2013 13:07:16
Message-Id: 20130528130709.C0EB22171E@flycatcher.gentoo.org
1 ryao 13/05/28 13:07:09
2
3 Added: spl-0.6.1-fix-delay.patch
4 Log:
5 Fix delay()
6
7 (Portage version: 2.2.0_alpha176/cvs/Linux x86_64, signed Manifest commit with key 0xBEE84C64)
8
9 Revision Changes Path
10 1.1 sys-kernel/spl/files/spl-0.6.1-fix-delay.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/spl/files/spl-0.6.1-fix-delay.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/spl/files/spl-0.6.1-fix-delay.patch?rev=1.1&content-type=text/plain
14
15 Index: spl-0.6.1-fix-delay.patch
16 ===================================================================
17 From ab59be7bc752481db64df07c821e2ae6bf2ae71b Mon Sep 17 00:00:00 2001
18 From: Brian Behlendorf <behlendorf1@××××.gov>
19 Date: Wed, 1 May 2013 16:20:28 -0700
20 Subject: [PATCH] Fix delay()
21
22 Somewhat amazingly it went unnoticed that the delay() function
23 doesn't actually cause the task to block. Since the task state
24 is never changed from TASK_RUNNING before schedule_timeout() the
25 scheduler allows to task to continue running without any delay.
26 Using schedule_timeout_interruptible() resolves the issue by
27 correctly setting TASK_UNINTERRUPTIBLE.
28
29 Signed-off-by: Brian Behlendorf <behlendorf1@××××.gov>
30 ---
31 include/sys/timer.h | 2 +-
32 1 file changed, 1 insertion(+), 1 deletion(-)
33
34 diff --git a/include/sys/timer.h b/include/sys/timer.h
35 index 13ef404..2542510 100644
36 --- a/include/sys/timer.h
37 +++ b/include/sys/timer.h
38 @@ -35,7 +35,7 @@
39 #define ddi_get_lbolt() ((clock_t)jiffies)
40 #define ddi_get_lbolt64() ((int64_t)get_jiffies_64())
41
42 -#define delay(ticks) schedule_timeout((long)(ticks))
43 +#define delay(ticks) schedule_timeout_uninterruptible(ticks)
44
45 #define SEC_TO_TICK(sec) ((sec) * HZ)
46 #define MSEC_TO_TICK(ms) msecs_to_jiffies(ms)
47 --
48 1.8.1.6