projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3421fb1
)
DLM: fix overflow dlm_cb_seq
author
tsutomu.owa@toshiba.co.jp
<tsutomu.owa@toshiba.co.jp>
Tue, 12 Sep 2017 09:01:46 +0000
(09:01 +0000)
committer
David Teigland
<teigland@redhat.com>
Mon, 25 Sep 2017 17:45:21 +0000
(12:45 -0500)
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>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/ast.c
patch
|
blob
|
history
diff --git
a/fs/dlm/ast.c
b/fs/dlm/ast.c
index 07fed838d8fdd4225a6877c05863fd3509ea4852..562fa8c3edff3e74d56dc1beaf96e7408c4421aa 100644
(file)
--- 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) {