Date: Fri, 1 Feb 2002 16:52:25 -0800 (PST) From: "Marcus L. Reid" <marcus@punq.net> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/34544: Kernel crash on fclose() of /dev/kbd1 when USB keyboard is detached while file is open. Message-ID: <200202020052.g120qPS52461@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 34544
>Category: kern
>Synopsis: Kernel crash on fclose() of /dev/kbd1 when USB keyboard is detached while file is open.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Feb 01 17:00:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Marcus L. Reid
>Release: 4.5-RELEASE
>Organization:
Gampro
>Environment:
FreeBSD zork.punq.net 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Fri Feb 1 16:06:37 PST 2002 root@zork.punq.net:/usr/obj/home/archive/releases/RELENG_4_5/src/sys/ZORK i386
>Description:
When a USB keyboard is detached while a process has /dev/kbd1 open, the machine crashes hard when the process tries to fclose() the file.
>How-To-Repeat:
int
main(void)
{
FILE *fp;
/* USB keyboard is attached. */
fp = fopen("/dev/kbd1", "r");
if(fp) {
printf("Unplug the keyboard in the next 10 seconds.\n");
sleep(10);
}
else {
fprintf(stderr, "Couldn't open /dev/kbd1\n");
exit(1);
}
/* USB keyboard is detached by now. */
fclose(fp);
/* Boom. */
exit(0);
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202020052.g120qPS52461>
