[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <379fb4870709040939m2430be6ci57fd73f1f9abc6ef@mail.gmail.com>
Date: Tue, 4 Sep 2007 18:39:33 +0200
From: "anon... anon.al" <anon.asdf@...il.com>
To: linux-kernel@...r.kernel.org
Subject: Race condition: calling remove_proc_entry in cleanup_module (module_exit) while someone's using procfile
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 remove this race condition, the code in "__exit device_exit" must
a) be sure that no other instance is in procfile functions
b) call remove_proc_entry before any other instance accesses the procfile
*** Is this at all possible if a race-condition is to be avoided?
If yes: which mechanism can be used?
Thanks -Albert
-
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