Author: pjd
Date: Thu Jun  7 23:33:10 2012
New Revision: 236731
URL: http://svn.freebsd.org/changeset/base/236731

Log:
  In fdalloc() f_ofileflags for the newly allocated descriptor has to be 0.
  Assert that instead of setting it to 0.
  
  Sponsored by: FreeBSD Foundation
  MFC after:    1 month

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==============================================================================
--- head/sys/kern/kern_descrip.c        Thu Jun  7 23:08:18 2012        
(r236730)
+++ head/sys/kern/kern_descrip.c        Thu Jun  7 23:33:10 2012        
(r236731)
@@ -1554,9 +1554,8 @@ fdalloc(struct thread *td, int minfd, in
         */
        KASSERT(!fdisused(fdp, fd),
            ("fd_first_free() returned non-free descriptor"));
-       KASSERT(fdp->fd_ofiles[fd] == NULL,
-           ("free descriptor isn't"));
-       fdp->fd_ofileflags[fd] = 0; /* XXX needed? */
+       KASSERT(fdp->fd_ofiles[fd] == NULL, ("free descriptor isn't"));
+       KASSERT(fdp->fd_ofileflags[fd] == 0, ("file flags are set"));
        fdused(fdp, fd);
        *result = fd;
        return (0);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to