Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Mar 2014 06:38:40 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r263261 - stable/10/sys/dev/usb/input
Message-ID:  <201403170638.s2H6cegh096357@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Mon Mar 17 06:38:40 2014
New Revision: 263261
URL: http://svnweb.freebsd.org/changeset/base/263261

Log:
  MFC r262972:
  Ignore USB keyboard driver calls from critical sections.

Modified:
  stable/10/sys/dev/usb/input/ukbd.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/usb/input/ukbd.c
==============================================================================
--- stable/10/sys/dev/usb/input/ukbd.c	Mon Mar 17 06:36:54 2014	(r263260)
+++ stable/10/sys/dev/usb/input/ukbd.c	Mon Mar 17 06:38:40 2014	(r263261)
@@ -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?201403170638.s2H6cegh096357>