Re: Race condition: calling remove_proc_entry in cleanup_module (module_exit) while someone's using procfile

2007-09-04 Thread anon... anon.al
On 9/4/07, Alexey Dobriyan <[EMAIL PROTECTED]> wrote: > For regular proc files, this is fixed in 2.6.23-rc1 and later. Thanks! I see you've been working on it: fix-rmmod-read-write-races-in-proc-entries...

Re: Race condition: calling remove_proc_entry in cleanup_module (module_exit) while someone's using procfile

2007-09-04 Thread Alexey Dobriyan
On Tue, Sep 04, 2007 at 06:39:33PM +0200, anon... anon.al wrote: > There is a race condition if an instance is executing "__exit > device_exit" and calls remove_proc_entry, while someone is still using > the procfile, right?. > > static void __exit device_exit(void) > { > // what if the

Re: Race condition: calling remove_proc_entry in cleanup_module (module_exit) while someone's using procfile

2007-09-04 Thread anon... anon.al
On 9/4/07, anon... anon.al <[EMAIL PROTECTED]> wrote: > If yes: which mechanism can be used? I was thinking about using an atomic counter in procfile_write proc_f = create_proc_entry(PROC_FILE_NAME, 0644, NULL); //... proc_f->write_proc = procfile_write; int procfile_write(struct file

Race condition: calling remove_proc_entry in cleanup_module (module_exit) while someone's using procfile

2007-09-04 Thread anon... anon.al
Hi! There is a race condition if an instance is executing "__exit device_exit" and calls remove_proc_entry, while someone is still using the procfile, right?. static void __exit device_exit(void) { // what if the procfile is still in use? remove_proc_entry(PROC_FILE_NAME, _root); } To

Race condition: calling remove_proc_entry in cleanup_module (module_exit) while someone's using procfile

2007-09-04 Thread anon... anon.al
Hi! There is a race condition if an instance is executing __exit device_exit and calls remove_proc_entry, while someone is still using the procfile, right?. static void __exit device_exit(void) { // what if the procfile is still in use? remove_proc_entry(PROC_FILE_NAME, proc_root); } To

Re: Race condition: calling remove_proc_entry in cleanup_module (module_exit) while someone's using procfile

2007-09-04 Thread anon... anon.al
On 9/4/07, anon... anon.al [EMAIL PROTECTED] wrote: snip If yes: which mechanism can be used? I was thinking about using an atomic counter in procfile_write proc_f = create_proc_entry(PROC_FILE_NAME, 0644, NULL); //... proc_f-write_proc = procfile_write; int procfile_write(struct file

Re: Race condition: calling remove_proc_entry in cleanup_module (module_exit) while someone's using procfile

2007-09-04 Thread Alexey Dobriyan
On Tue, Sep 04, 2007 at 06:39:33PM +0200, anon... anon.al wrote: There is a race condition if an instance is executing __exit device_exit and calls remove_proc_entry, while someone is still using the procfile, right?. static void __exit device_exit(void) { // what if the procfile is

Re: Race condition: calling remove_proc_entry in cleanup_module (module_exit) while someone's using procfile

2007-09-04 Thread anon... anon.al
On 9/4/07, Alexey Dobriyan [EMAIL PROTECTED] wrote: For regular proc files, this is fixed in 2.6.23-rc1 and later. Thanks! I see you've been working on it: fix-rmmod-read-write-races-in-proc-entries...