forked from Minki/linux
7b791d6856
dlm_get_lock_resource() is supposed to return a lock resource with a proper master. If multiple concurrent threads attempt to lookup the lockres for the same lockid while the lock mastery in underway, one or more threads are likely to return a lockres without a proper master. This patch makes the threads wait in dlm_get_lock_resource() while the mastery is underway, ensuring all threads return the lockres with a proper master. This issue is known to be limited to users using the flock() syscall. For all other fs operations, the ocfs2 dlmglue layer serializes the dlm op for each lockid. Users encountering this bug will see flock() return EINVAL and dmesg have the following error: ERROR: Dlm error "DLM_BADARGS" while calling dlmlock on resource <LOCKID>: bad api args Reported-by: Coly Li <coyli@suse.de> Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com> |
||
---|---|---|
.. | ||
dlmapi.h | ||
dlmast.c | ||
dlmcommon.h | ||
dlmconvert.c | ||
dlmconvert.h | ||
dlmdebug.c | ||
dlmdebug.h | ||
dlmdomain.c | ||
dlmdomain.h | ||
dlmfs.c | ||
dlmfsver.c | ||
dlmfsver.h | ||
dlmlock.c | ||
dlmmaster.c | ||
dlmrecovery.c | ||
dlmthread.c | ||
dlmunlock.c | ||
dlmver.c | ||
dlmver.h | ||
Makefile | ||
userdlm.c | ||
userdlm.h |