This patch will fix a race by surround ls_cb_mutex in set_bit() and the
test_bit() and it's conditional code blocks for LSFL_CB_DELAY.
The function dlm_callback_stop() has the idea to stop all callbacks and
flush all currently queued onces. The set_bit() is not enough because
there can be still qu
Hi,
this patch series contains fixes for lowcomms and -EBUSY handling. In
lowcomms we have a race which could end in a use after free. The current
validation of DLM API and between -EBUSY cases vs -EINVAL cases has a
issue because -EINVAL is checked on first but reading variables which
are only va
This patch fixes a race between queue_work() in
_dlm_lowcomms_commit_msg() and srcu_read_unlock(). The queue_work() can
take the final reference of a dlm_msg and so msg->idx can contain
garbage which is signaled by the following warning:
[ 676.237050] [ cut here ]
[ 676.2
The DLM_LSFL_FS should be never part of the dlm lockspace uapi headers.
If a user space dlm user is using this flag it's doing something wrong
for user space flags. If their program doesn't compile anymore because
this flag is missing we do a favour for them by signaling them there is
a bug. Even t
Currently we handle in dlm_receive_buffer() everything else than a
DLM_MSG type as DLM_RCOM message. Although a different message than
DLM_MSG should be a DLM_RCOM we should explicit check on DLM_RCOM and
drop a log_error() if we see something unexpected.
Signed-off-by: Alexander Aring
---
fs/dl
There are several times of using hard-coded function names inside the
format string. When changing code checkpatch will drop a warning about
this. This patch prepares to not dropping a checkpatch warning when
introduce the same log message for a different loglevel by using
__func__ instead of a har
This patch changes the ls_clear_proc_locks to a spinlock because there
is no need to handle it as a mutex as there is no sleepable context when
ls_clear_proc_locks is held. This allows us to call those functionality
in non-sleepable contexts.
Signed-off-by: Alexander Aring
---
fs/dlm/dlm_interna
If the user generates a -EINVAL it's probably because the user using DLM
wrong. To give the user notice about that wrong behaviour we should
always print -EINVAL errors on the proper loglevel. In case of other
errors like -EBUSY it will be still printed on debug loglevel as the
current API handles
I experience issues when putting a lkbsb on the stack and have sb_lvbptr
field to a dangled pointer while not using DLM_LKF_VALBLK. It will crash
with the following kernel message, the dangled pointer is here
0xdeadbeef as example:
[ 102.749317] BUG: unable to handle page fault for address: 0
This patch will introduce a locktorture test for DLM subsystem. The idea
is to have a torture test to proof some performance indication for DLM.
This torture test will allocate for each lock task a DLM lock and try to
acquire the lock as much as it can. In a homogeneous cluster (all nodes
have equa
A dlm user can never use DLM_LKF_VALBLK flag with DLM API calls so a zero
lvblen should be allowed as per lockspace parameter.
Signed-off-by: Alexander Aring
---
fs/dlm/lockspace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index 3
This patch adds trace callbacks for user locks. Unfortenately user locks
are handled in a different way than kernel locks in some cases. User
locks never call the dlm_lock()/dlm_unlock() kernel API and use the next
step internal API of dlm. Adding those traces from user API callers
should make it p
This patch removes dlm_del_ast() prototype which is not being used in
the dlm subsystem because there is not implementation for it.
Signed-off-by: Alexander Aring
---
fs/dlm/ast.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/dlm/ast.h b/fs/dlm/ast.h
index 181ad7d20c4d..e5e05fcc5813 1006
This patch only set/clear the LSFL_CB_DELAY bit when it's actually a
kernel lockspace signaled by if ls->ls_callback_wq is set or not set in
this case. User lockspaces will never evaluate this flag.
Signed-off-by: Alexander Aring
---
fs/dlm/ast.c | 13 +++--
1 file changed, 7 insertions(
The resource name parameter should never be changed by DLM so we declare
it as const. At some point it is handled as a char pointer, a resource
name can be a non printable ascii string as well. This patch change it
to handle it as void pointer as it is offered by DLM API.
Signed-off-by: Alexander
This patch checks on -EBUSY for dlm_unlock() for non CANCEL or
FORCEUNLOCK case validation at first. Similar like it's done for
dlm_lock(). Although the current way looks okay we should anyway
moving the -EBUSY check at first after doing a check on -EINVAL
regarding to the lkb state. If new -EINVAL
In case of lock args validation we should at first check on -EBUSY then
on -EINVAL. The -EINVAL conditions checks against lkb state variables
which are not stable in case something is in -EBUSY lkb condition state
e.g. lkb->lkb_grmode. This patch checks at first if -EBUSY condition is
not met, then
The netlink implementation is actually not build and the timewarn
setting in controld would only activate some debugging warning if some
lock requests got stucked without any other notification mechanism e.g.
netlink. We remove this handling now because the dlm kernel
implementation deprecates this
To avoid -EBUSY cases we should use 2 as default for force when
releasing the lockspace.
---
python/bindings/dlm.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/bindings/dlm.py b/python/bindings/dlm.py
index b77d374c..b592a3e4 100644
--- a/python/bindings/dlm.py
+++ b
This patch forces to disable the timeout parameter for libdlm users as
this feature is now deprecated and we will just unset it even if the
user sets it to a value.
---
libdlm/libdlm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/libdlm/libdlm.c b/libdlm/libdlm.c
index ebfba457..fbdf9a09 1
This patch forces to disable the DLM_LSFL_TIMEWARN flag for libdlm users
as this feature is now deprecated and we will just unset it even if the
user sets it.
---
libdlm/libdlm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libdlm/libdlm.c b/libdlm/libdlm.c
index fbdf9a09..c5e78616 100644
-
21 matches
Mail list logo