[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070131184251.GA5544@martell.zuzino.mipt.ru>
Date: Wed, 31 Jan 2007 21:42:51 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: Duncan Sands <duncan.sands@...h.u-psud.fr>
Cc: linux-kernel@...r.kernel.org
Subject: Re: remove_proc_entry and read_proc
On Wed, Jan 31, 2007 at 11:54:35AM +0100, Duncan Sands wrote:
> Can read_proc still be executing when remove_proc_entry returns?
>
> In my driver [*] I allocate some data and create a proc entry using
> create_proc_entry. My read method reads from my allocated data. When
> shutting down, I call remove_proc_entry and immediately free the data.
> If some call to read_proc is still executing at this point then it will
> be accessing freed memory. Can this happen? I've been rummaging around
> in fs/proc to see what prevents it, but didn't find anything yet.
This should be fixed by the following patch (in -mm currently):
http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.20-rc6/2.6.20-rc6-mm3/broken-out/fix-rmmod-read-write-races-in-proc-entries.patch
Tell me if you're unsure it will.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists