]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[DLM] fix a couple of races
authorSatyam Sharma <ssatyam@cse.iitk.ac.in>
Tue, 8 May 2007 08:18:58 +0000 (09:18 +0100)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 9 Jul 2007 07:22:10 +0000 (08:22 +0100)
commit3168b0780d06ace875696f8a648d04d6089654e5
treeb93814b13155cce67432e1ed11bee58c9a5d5a50
parentb524fe646c9a226a847e30ca1221dc22e952f16b
[DLM] fix a couple of races

Fix two races in fs/dlm/config.c:

(1) Grab the configfs subsystem semaphore before calling
config_group_find_obj() in get_space(). This solves a potential race
between get_space() and concurrent mkdir(2) or rmdir(2).

(2) Grab a reference on the found config_item _while_ holding the configfs
subsystem semaphore in get_comm(), and not after it. This solves a
potential race between get_comm() and concurrent rmdir(2).

Signed-off-by: Satyam Sharma <ssatyam@cse.iitk.ac.in>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/dlm/config.c