svn commit: r276338 - stable/10/sys/kern

Marcel Moolenaar marcel at FreeBSD.org
Sun Dec 28 18:53:18 UTC 2014


Author: marcel
Date: Sun Dec 28 18:53:16 2014
New Revision: 276338
URL: https://svnweb.freebsd.org/changeset/base/276338

Log:
  MFC r269126 & 272786:
  Don't return ERESTART when the device is gone.

Modified:
  stable/10/sys/kern/tty.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/tty.c
==============================================================================
--- stable/10/sys/kern/tty.c	Sun Dec 28 18:43:39 2014	(r276337)
+++ stable/10/sys/kern/tty.c	Sun Dec 28 18:53:16 2014	(r276338)
@@ -1391,14 +1391,14 @@ tty_wait(struct tty *tp, struct cv *cv)
 
 	error = cv_wait_sig(cv, tp->t_mtx);
 
-	/* Restart the system call when we may have been revoked. */
-	if (tp->t_revokecnt != revokecnt)
-		return (ERESTART);
-
 	/* Bail out when the device slipped away. */
 	if (tty_gone(tp))
 		return (ENXIO);
 
+	/* Restart the system call when we may have been revoked. */
+	if (tp->t_revokecnt != revokecnt)
+		return (ERESTART);
+
 	return (error);
 }
 
@@ -1413,14 +1413,14 @@ tty_timedwait(struct tty *tp, struct cv 
 
 	error = cv_timedwait_sig(cv, tp->t_mtx, hz);
 
-	/* Restart the system call when we may have been revoked. */
-	if (tp->t_revokecnt != revokecnt)
-		return (ERESTART);
-
 	/* Bail out when the device slipped away. */
 	if (tty_gone(tp))
 		return (ENXIO);
 
+	/* Restart the system call when we may have been revoked. */
+	if (tp->t_revokecnt != revokecnt)
+		return (ERESTART);
+
 	return (error);
 }
 


More information about the svn-src-stable mailing list