[lkml]   [2001]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] Problem: file /proc/tty/driver/serial does not get deleted on module unload in Kernel 2.4.4
[1.] Summary: The file /proc/tty/driver/serial does not get deleted on module unload
[2.] Description: If the serial driver (compiled as module) is loaded and then
unloaded, the proc-entry tty/driver/serial does not get deleted.
The remaining file is invalid and produces a kernel-oops on access.
[3.] Keywords: procfs, tty, serial driver
[4.] Kernel version: 2.4.4

[6.] Shell script:
insmod serial
rmmod serial
ls /proc/tty/driver

[7.] Environment (IMHO irrelevant)
[7.1.] Software:
Linux jk1 2.4.4 #3 Mon Apr 30 00:11:51 CEST 2001 i586 unknown

Gnu C 2.95.3
Gnu make 3.79
binutils 2.10.1
mount 2.9y
modutils 2.4.1
e2fsprogs 1.19
reiserfsprogs 3.x.0b
PPP 2.4.0
Linux C Library 2.2.2
Dynamic linker (ldd) 2.2.2
Procps 2.0.2
Net-tools 1.46
Kbd 0.96
Sh-utils 1.12
Modules Loaded serial isa-pnp ipchains

[6.2.] Processor: Intel Pentium, 90 MHz

[X.] Other notes

I played with the source and found out that the following one-line-patch helps.
If the function proc_tty_unregister is called, the string driver->driver_name
is empty, but ent->name still contains the right filename; so by using this
the proc-entry is deleted correctly.

--- linux/fs/proc/vanilla/proc_tty.c Sun Apr 29 23:34:09 2001
+++ linux/fs/proc/proc_tty.c Sun Apr 29 23:46:32 2001
@@ -161,7 +161,7 @@
if (!ent)

- remove_proc_entry(driver->driver_name, proc_tty_driver);
+ remove_proc_entry(ent->name, proc_tty_driver);

driver->proc_entry = 0;
I'm not on this list, so please answer with CC to me.

hope, I could help,

Johannes Kolb
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:52    [W:1.881 / U:0.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site