[PATCH] Fencepost error in devpts

From: Andreas Schwab (schwab@suse.de)
Date: Mon May 08 2000 - 10:09:12 EST


There is a fencepost error in the devpts filesystem. The readdir function
never returns the entries with the number CONFIG_UNIX98_PTY_COUNT-1 and
CONFIG_UNIX98_PTY_COUNT-2, even if they exist.

--- fs/devpts/root.c.~1~ Tue May 2 17:26:05 2000
+++ fs/devpts/root.c Tue May 2 18:02:57 2000
@@ -66,5 +66,5 @@
                 /* fall through */
         default:
- while ( nr < sbi->max_ptys ) {
+ while ( nr - 2 < sbi->max_ptys ) {
                         int ptynr = nr - 2;
                         if ( sbi->inodes[ptynr] ) {

Andreas.

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg

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



This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:11 EST