提交 ccbbea04 编写于 作者: T tsutomu.owa@toshiba.co.jp 提交者: David Teigland

DLM: fix overflow dlm_cb_seq

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: NTadashi Miyauchi <miyauchi@toshiba-tops.co.jp>
Signed-off-by: NTsutomu Owa <tsutomu.owa@toshiba.co.jp>
Signed-off-by: NDavid Teigland <teigland@redhat.com>
上级 3421fb15
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册