[lkml]   [2012]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [BUG] kernel freezes with latest tree
On Tue, Jan 10, 2012 at 8:37 AM, Eric Dumazet <> wrote:
> Just to make sure I understood well, here is what I tested :

Yup, that was it.

That was the obvious thing about the merge to check.

I suspect that what remains is now the sparse cleanups and
usecs_to_cputime64() interaction. I note that you are running on a
32-bit setup, which is where such problems would show up (because any
new casts to "unsigned long" due to the forced sparse casting would
now actually truncate a 64-bit value down.

Just to test that theory, can you try this attached patch that simply
removes the casts? That's what we used to have before adding the
stricter type-checking (other things changed too, so this may not make
any difference, but this is a "test a small change to *maybe* narrow
things down")

Martin - mind re-running sparse on the 32-bit case to see if that
shows some messed-up case?

include/asm-generic/cputime.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/asm-generic/cputime.h b/include/asm-generic/cputime.h
index 9a62937c56ca..aa8bb708085b 100644
--- a/include/asm-generic/cputime.h
+++ b/include/asm-generic/cputime.h
@@ -7,14 +7,14 @@
typedef unsigned long __nocast cputime_t;

#define cputime_one_jiffy jiffies_to_cputime(1)
-#define cputime_to_jiffies(__ct) (__force unsigned long)(__ct)
+#define cputime_to_jiffies(__ct) (__ct)
#define cputime_to_scaled(__ct) (__ct)
-#define jiffies_to_cputime(__hz) (__force cputime_t)(__hz)
+#define jiffies_to_cputime(__hz) (__hz)

typedef u64 __nocast cputime64_t;

-#define cputime64_to_jiffies64(__ct) (__force u64)(__ct)
-#define jiffies64_to_cputime64(__jif) (__force cputime64_t)(__jif)
+#define cputime64_to_jiffies64(__ct) (__ct)
+#define jiffies64_to_cputime64(__jif) (__jif)

#define nsecs_to_cputime64(__ct) \
 \ /
  Last update: 2012-01-10 17:51    [W:0.085 / U:0.612 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site