Messages in this thread | | | Date | Thu, 21 Sep 2000 22:20:37 +1100 | From | Andrew Morton <> | Subject | Re: null TTY in tty_fasync? |
| |
Jeff Garzik wrote: > > Andrew Morton wrote: > > Having stared sleepily at the code for several evenings I see no way in > > which serial_driver.refcount can be non-zero while serial.o's module > > refcount is zero. But it happened. > > Is it possible to replace serial_driver.refcount with calls to > GET_USE_COUNT()? No need to have two refcounts for the same thing, > usually...
I'm a frayed knot. The refcounts are owned by the device driver but are exported to and manipulated by the tty layer. They must exist whether or not the driver is within a module. Similar to net_device.refcnt.
Now, could the module refcount be replaced by a callback called "i_want_to_unload_you_is_this_ok()"? And could that function test the tty-layer refcount for zeroness and if true, mark the module as dead and return TRUE? Now you're talking. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
| |