Skip to contentSkip to conversation

prevent oops from read of proc entry for tty drivers

PATCH New Stephen Hemminger 1 participant 1 message Nov 25, 2003 2 messages not in the archive Proc filesystem

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

PATCH 1/1 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. Fix is to propagate owner of tty_driver to proc entry.

fs/proc/proc_tty.c +1 -0
diff -Nru a/fs/proc/proc_tty.c b/fs/proc/proc_tty.c
@@ -198,6 +198,7 @@
 		return;
 	ent->read_proc = driver->read_proc;
 	ent->write_proc = driver->write_proc;
+	ent->owner = driver->owner;
 	ent->data = driver;
 
 	driver->proc_entry = ent;