]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/rcutorture.c
[PATCH] rcu: Fix sign bug making rcu_random always return the same sequence
[linux-2.6-omap-h63xx.git] / kernel / rcutorture.c
index 42e7f01e8003af785a335bc9c12f7adab34d9a97..43d6d4f9ef09a21f806edb11e0dfefac8d75a064 100644 (file)
@@ -147,7 +147,7 @@ rcu_torture_free(struct rcu_torture *p)
 
 struct rcu_random_state {
        unsigned long rrs_state;
-       unsigned long rrs_count;
+       long rrs_count;
 };
 
 #define RCU_RANDOM_MULT 39916801  /* prime */
@@ -160,7 +160,7 @@ struct rcu_random_state {
  * Crude but fast random-number generator.  Uses a linear congruential
  * generator, with occasional help from get_random_bytes().
  */
-static long
+static unsigned long
 rcu_random(struct rcu_random_state *rrsp)
 {
        long refresh;