Subject: Re: Crashes in -current kernel
To: Charles M. Hannum <mycroft@ai.mit.edu>
From: Don Lewis <gdonl@gv.ssi1.com>
List: current-users
Date: 02/01/1996 23:22:34
On Jan 30,  3:22pm, "Charles M. Hannum" wrote:
} Subject: Re: Crashes in -current kernel
} 
}    It seems that when the user hangs up a modem connection, MLink
}    receives a SIGHUP and tries to fchmod() to restore the tty
}    settings.  However, at this point the tty line has already been
}    closed and the vp->v_mount pointer in kern/vfs_syscalls.c is NULL.
} 
} Indeed, there are several system calls that could fail in this way.
} The following patch should fix them (to return EBADF in this case).

Won't this leave the the device modes in the wrong state (a possible
security problem).  It seems to me that the correct fix would keep
the device open so that the fchmod() could be done but in some sort of
crippled state until it is close()ed and re-open()ed.

Would this patch also cause close() to return EBADF?  That seems like
like it might cause a defensively written program to unnecessarily
panic.

			---  Truck