Re: mutex Giant recursed at /usr/src/sys/kern/tty.c:1222 (via linux_ioctl_termio)

From: Ed Schouten <ed_at_80386.nl>
Date: Mon, 2 Mar 2009 10:26:52 +0100
HI Yuriy,

The subject line says enough: the Linuxolator calls into the TTY layer
holding Giant. I changed the TTY layer some time ago to never acquire
Giant recursively by making /dev/console MPSAFE. It can only happen that
drivers pick up Giant recursively before calling into the TTY layer, but
this is generally not a problem.

The assertion in the code isn't really required. It isn't necessarily
bad to recurse on Giant, but looking forward to a Giantless kernel, I
think it's not a bad idea to keep it there.

Two ways to fix this problem:

- Fix the Linuxolator to not require Giant (which I like).
- Remove MA_NOTRECURSED from tty_(timed)wait() (which I don't like).

Because I'm now rdivacky's mentor, I talk a lot to him anyway. I'll
discuss this subject with him. Thanks for reporting this issue.

-- 
 Ed Schouten <ed_at_80386.nl>
 WWW: http://80386.nl/

Received on Mon Mar 02 2009 - 08:26:53 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:43 UTC