lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080201133805.GA25632@tv-sign.ru>
Date:	Fri, 1 Feb 2008 16:38:05 +0300
From:	Oleg Nesterov <oleg@...sign.ru>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>
Cc:	Alexey Dobriyan <adobriyan@...ru>, Ingo Molnar <mingo@...e.hu>,
	Pavel Emelyanov <xemul@...ru>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Toyo Abe <toyoa@...sta.com>, linux-kernel@...r.kernel.org
Subject: [PATCH 5/5] hrtimer_nanosleep_restart: don't play with restart_block->fn

hrtimer_nanosleep_restart() clears/restores restart_block->fn. This is
pointless and complicates its usage. Note that if sys_restart_syscall()
doesn't actually happen, we have a bogus "pending" restart->fn anyway,
this is harmless.

Signed-off-by: Oleg Nesterov <oleg@...sign.ru>

--- MM/kernel/hrtimer.c~5_RESTART_FN	2008-02-01 13:56:44.000000000 +0300
+++ MM/kernel/hrtimer.c	2008-02-01 15:15:15.000000000 +0300
@@ -1338,8 +1338,6 @@ long __sched hrtimer_nanosleep_restart(s
 	struct hrtimer_sleeper t;
 	struct timespec __user  *rmtp;
 
-	restart->fn = do_no_restart_syscall;
-
 	hrtimer_init(&t.timer, restart->arg0, HRTIMER_MODE_ABS);
 	t.timer.expires.tv64 = ((u64)restart->arg3 << 32) | (u64) restart->arg2;
 
@@ -1353,8 +1351,6 @@ long __sched hrtimer_nanosleep_restart(s
 			return ret;
 	}
 
-	restart->fn = hrtimer_nanosleep_restart;
-
 	/* The other values in restart are already filled in */
 	return -ERESTART_RESTARTBLOCK;
 }
--- MM/kernel/compat.c~5_RESTART_FN	2008-02-01 15:05:28.000000000 +0300
+++ MM/kernel/compat.c	2008-02-01 15:16:01.000000000 +0300
@@ -57,10 +57,8 @@ static long compat_nanosleep_restart(str
 		if (rmtp && put_compat_timespec(&tu, rmtp))
 			return -EFAULT;
 
-		if (err == -ERESTART_RESTARTBLOCK) {
-			restart->fn = compat_nanosleep_restart;
+		if (err == -ERESTART_RESTARTBLOCK)
 			restart->arg1 = (unsigned long)rmtp;
-		}
 	}
 
 	return err;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ