dtor like behaviour of release() broken

Douglas Gilbert (dgilbert@interlog.com)
Wed, 27 Oct 1999 21:19:30 -0400


In a character driver, the way the kernel calls release()
on an open file descriptor whose process has just been
(ab)normally terminated (e.g. SIGINT) is very useful. It
allows the device driver to free up kernel resources that
have been bound to the fd (and also potentially allows the
driver to be unloaded later if it is module).

However when using part of the "raw io" interface recently added
by Stephen Tweedie the process locks up in "DW" state _before_
it calls the driver release() function. If the kernel called
the driver release() before it decided there were locked
pages then the problem wouldn't occur since the driver would
have unlocked these pages (and released memory, locks, etc).

The kernel being tested is 2.3.21 . Is there a good reason for
the ordering in the process shutdown or is it arbitrary? If
it is arbitrary can it be changed?

Doug Gilbert

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/