On Sun, Feb 26, 2012 at 02:34:48PM +0800, majianpeng wrote: > >From 49b46362bf3221a259bfc73105ad041376b66878 Mon Sep 17 00:00:00 2001 > From: majianpeng <majianpeng@xxxxxxxxx> > Date: Sun, 26 Feb 2012 22:19:51 +0800 > Subject: [PATCH] proc:Add a reference of module when proc_reg_file opened. > > If struct file_operations of a regular file in procfs defined in module > and defined .owner = THIS_MODULE,open this file must get a reference of > module. No. Read remove_proc_entry(), especially the part under ->pde_unload_lock. The whole damn point of that stuff is that opened file on procfs does *not* pin the module down; IO in progress does, but that's it. You can't deadlock rmmod foobar </proc/crap/foobar; with your patch we'll be back to a pile of deadlocks in there. IOW, NAK. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html