diff options
author | tsutomu.owa@toshiba.co.jp <tsutomu.owa@toshiba.co.jp> | 2017-09-12 09:01:46 +0000 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2017-09-25 12:45:21 -0500 |
commit | ccbbea04326e061651e0b38eda0792c758ce4f91 (patch) | |
tree | 7bbe3f8cfd76e83f85d0d2ba7ac953c04fef8a22 /fs | |
parent | 3421fb15be01ff4714fed5a5d6db64849b59a1fd (diff) |
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: 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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/dlm/ast.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/dlm/ast.c b/fs/dlm/ast.c index 07fed838d8fd..562fa8c3edff 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) { |