patch-2.4.19 linux-2.4.19/kernel/time.c

Next file: linux-2.4.19/kernel/timer.c
Previous file: linux-2.4.19/kernel/sysctl.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/kernel/time.c linux-2.4.19/kernel/time.c
@@ -216,6 +216,11 @@
 		
 	/* Now we validate the data before disabling interrupts */
 
+	if ((txc->modes & ADJ_OFFSET_SINGLESHOT) == ADJ_OFFSET_SINGLESHOT)
+	  /* singleshot must not be used with any other mode bits */
+		if (txc->modes != ADJ_OFFSET_SINGLESHOT)
+			return -EINVAL;
+
 	if (txc->modes != ADJ_OFFSET_SINGLESHOT && (txc->modes & ADJ_OFFSET))
 	  /* adjustment Offset limited to +- .512 seconds */
 		if (txc->offset <= - MAXPHASE || txc->offset >= MAXPHASE )

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)