Commit 0dbccfbf authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Linus Torvalds

[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.
parent f86027d7
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment