[Cluster-devel] [PATCH 2/4] [DLM] fix a couple of races

Steven Whitehouse swhiteho at redhat.com
Mon Jun 18 14:54:28 UTC 2007


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 at cse.iitk.ac.in>
Signed-off-by: David Teigland <teigland at redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho at redhat.com>
---
 fs/dlm/config.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1f692e48dd1f3fa00629c69b2e34ab35c9929b45.diff
Type: text/x-patch
Size: 1066 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070618/badca0be/attachment.bin>


More information about the Cluster-devel mailing list