cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH 15/18] [try #2] DLM: fix overflow dlm_cb_seq
@ 2017-09-12  9:01 tsutomu.owa
  0 siblings, 0 replies; only message in thread
From: tsutomu.owa @ 2017-09-12  9:01 UTC (permalink / raw)
  To: cluster-devel.redhat.com

dlm_cb_seq is 64 bits. If dlm_cb_seq overflows and returns to 0,
dlm_rem_lkb_callback() will not work properly.

Signed-off-by: Tadashi Miyauchi <miyauchi@toshiba-tops.co.jp>
Signed-off-by: Tsutomu Owa <tsutomu.owa@toshiba.co.jp>
---
 fs/dlm/ast.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/dlm/ast.c b/fs/dlm/ast.c
index 07fed83..562fa8c 100644
--- a/fs/dlm/ast.c
+++ b/fs/dlm/ast.c
@@ -181,6 +181,8 @@ void dlm_add_cb(struct dlm_lkb *lkb, uint32_t flags, int mode, int status,
 
 	spin_lock(&dlm_cb_seq_spin);
 	new_seq = ++dlm_cb_seq;
+	if (!dlm_cb_seq)
+		new_seq = ++dlm_cb_seq;
 	spin_unlock(&dlm_cb_seq_spin);
 
 	if (lkb->lkb_flags & DLM_IFL_USER) {
-- 
2.7.4







^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-12  9:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-12  9:01 [Cluster-devel] [PATCH 15/18] [try #2] DLM: fix overflow dlm_cb_seq tsutomu.owa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).