From 0dbccfbff3046fee234c3ce41a41f5faea0fa95e Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 25 Nov 2003 15:01:31 -0800 Subject: [PATCH] prevent oops from read of proc entry for tty drivers There are /proc handles there setup by proc_tty_register_driver, but there is no module ownership association, so anything that reads after module unload will blow. The trivial fix is to propagate the owner of tty_driver to proc entry. --- fs/proc/proc_tty.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/proc/proc_tty.c b/fs/proc/proc_tty.c index f0f93a00ea4c..df25a6ae0af5 100644 --- a/fs/proc/proc_tty.c +++ b/fs/proc/proc_tty.c @@ -198,6 +198,7 @@ void proc_tty_register_driver(struct tty_driver *driver) return; ent->read_proc = driver->read_proc; ent->write_proc = driver->write_proc; + ent->owner = driver->owner; ent->data = driver; driver->proc_entry = ent; -- cgit v1.2.3