Re: Deadlock between GEOM and devfs device destroy and process exit.

From: Ed Schouten <ed_at_80386.nl>
Date: Sat, 30 Jan 2010 21:07:41 +0100
Hi all,

* Kostik Belousov <kostikbel_at_gmail.com> wrote:
> My exemplary case has been snp(4) before tty got rewritten, see r. 1.107
> of sys/dev/snp/snp.c. No calls to destroy_dev_sched() that I placed in
> the src/ a kept around, that is good because corresponding subsystems
> got serious rewrite.

The current TTY code still uses destroy_dev_sched_cb(). In a very old
version of the new TTY code, close() on a pseudo-terminal master device
would also end up calling destroy_dev(), which meant it blocked until
the TTY was closed as well, which is obviously not what it should do.

I changed the TTY code to destroy_dev_sched_cb(), which means tty_gone()
doesn't block. The TTY layer later calls a callback function, so the pts
driver can deallocate the softc and reclaim the unit number (pts/%d).

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

Received on Sat Jan 30 2010 - 19:07:42 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:00 UTC