OpenCloudOS-Kernel/fs/ocfs2/dlm
Sunil Mushran b0d4f817ba ocfs2/dlm: Fix race in adding/removing lockres' to/from the tracking list
This patch adds a new lock, dlm->tracking_lock, to protect adding/removing
lockres' to/from the dlm->tracking_list. We were previously using dlm->spinlock
for the same, but that proved inadequate as we could be freeing a lockres from
a context that did not hold that lock. As the new lock only protects this list,
we can explicitly take it when removing the lockres from the tracking list.

This bug was exposed when testing multiple processes concurrently flock() the
same file.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2009-01-05 08:40:35 -08:00
..
Makefile ocfs2: Only build ocfs2/dlm with the o2cb stack module 2008-04-18 08:56:12 -07:00
dlmapi.h ocfs2: Negotiate locking protocol versions. 2008-02-06 16:11:29 -08:00
dlmast.c ocfs2/dlm: Clean up errors in dlm_proxy_ast_handler() 2009-01-05 08:40:35 -08:00
dlmcommon.h ocfs2/dlm: Fix race in adding/removing lockres' to/from the tracking list 2009-01-05 08:40:35 -08:00
dlmconvert.c ocfs2: Use dlm_print_one_lock_resource for lock resource print 2008-03-10 15:13:50 -07:00
dlmconvert.h [PATCH] OCFS2: The Second Oracle Cluster Filesystem 2006-01-03 11:45:47 -08:00
dlmdebug.c ocfs2/dlm: Fix race in adding/removing lockres' to/from the tracking list 2009-01-05 08:40:35 -08:00
dlmdebug.h [PATCH 2/3] ocfs2/dlm: Silence build warnings 2008-05-30 15:15:10 -07:00
dlmdomain.c ocfs2/dlm: Fix race in adding/removing lockres' to/from the tracking list 2009-01-05 08:40:35 -08:00
dlmdomain.h [PATCH] OCFS2: The Second Oracle Cluster Filesystem 2006-01-03 11:45:47 -08:00
dlmfs.c Merge branch 'master' into next 2008-12-04 17:16:36 +11:00
dlmfsver.c ocfs2: bump version number 2008-01-25 15:05:46 -08:00
dlmfsver.h [PATCH] OCFS2: The Second Oracle Cluster Filesystem 2006-01-03 11:45:47 -08:00
dlmlock.c ocfs2/dlm: Create slabcaches for lock and lockres 2008-04-18 08:56:08 -07:00
dlmmaster.c ocfs2/dlm: Fix race in adding/removing lockres' to/from the tracking list 2009-01-05 08:40:35 -08:00
dlmrecovery.c ocfs2/dlm: Print message showing the recovery master 2008-03-10 15:14:14 -07:00
dlmthread.c ocfs2/dlm: Hold off sending lockres drop ref message while lockres is migrating 2009-01-05 08:40:35 -08:00
dlmunlock.c ocfs2: Added post handler callable function in o2net message handler 2007-02-07 12:06:56 -08:00
dlmver.c ocfs2: bump version number 2008-01-25 15:05:46 -08:00
dlmver.h [PATCH] OCFS2: The Second Oracle Cluster Filesystem 2006-01-03 11:45:47 -08:00
userdlm.c ocfs2: Negotiate locking protocol versions. 2008-02-06 16:11:29 -08:00
userdlm.h ocfs2: comments typo fix 2008-12-01 14:46:31 -08:00