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
This commit is contained in:
parent
d3644b04ca
commit
bf3e37ef15
@ -1554,9 +1554,8 @@ fdalloc(struct thread *td, int minfd, int *result)
|
||||
*/
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user