]> git.hungrycats.org Git - linux/commitdiff
[PATCH] posix-timers: fix callback address truncation
authorAndrew Morton <akpm@digeo.com>
Wed, 19 Feb 2003 00:53:04 +0000 (16:53 -0800)
committerRichard Henderson <rth@kanga.twiddle.net>
Wed, 19 Feb 2003 00:53:04 +0000 (16:53 -0800)
Casting a 64-bit address to int, then to unsigned long will truncate it.

kernel/posix-timers.c

index 6552ffa2db3910d107073f491574b3640582190b..926b9f8fa8bb226a74c0324dcd850c87c4c2efe4 100644 (file)
@@ -1294,7 +1294,7 @@ do_clock_nanosleep(clockid_t which_clock, int flags, struct timespec *tsave)
                }
                restart_block->fn = clock_nanosleep_restart;
                restart_block->arg0 = which_clock;
-               restart_block->arg1 = (int)tsave;
+               restart_block->arg1 = (unsigned long)tsave;
                restart_block->arg2 = new_timer.expires;
                return -ERESTART_RESTARTBLOCK;
        }