Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Mar 2014 08:52:30 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r262972 - head/sys/dev/usb/input
Message-ID:  <201403100852.s2A8qUdC045704@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Mon Mar 10 08:52:30 2014
New Revision: 262972
URL: http://svnweb.freebsd.org/changeset/base/262972

Log:
  Ignore USB keyboard driver calls from critical sections.
  
  Reported by:	Oliver Pinter <oliver.pntr@gmail.com>
  MFC after:	1 week

Modified:
  head/sys/dev/usb/input/ukbd.c

Modified: head/sys/dev/usb/input/ukbd.c
==============================================================================
--- head/sys/dev/usb/input/ukbd.c	Mon Mar 10 06:41:48 2014	(r262971)
+++ head/sys/dev/usb/input/ukbd.c	Mon Mar 10 08:52:30 2014	(r262972)
@@ -1909,6 +1909,12 @@ ukbd_ioctl(keyboard_t *kbd, u_long cmd, 
 	int result;
 
 	/*
+	 * XXX Check of someone is calling us from a critical section:
+	 */
+	if (curthread->td_critnest != 0)
+		return (EDEADLK);
+
+	/*
 	 * XXX KDGKBSTATE, KDSKBSTATE and KDSETLED can be called from any
 	 * context where printf(9) can be called, which among other things
 	 * includes interrupt filters and threads with any kinds of locks



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403100852.s2A8qUdC045704>