diff options
author | Jun Piao <piaojun@huawei.com> | 2016-03-15 17:53:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-15 19:55:16 -0400 |
commit | 8d67d3c2444fd3bb787cc6c27053717c01155966 (patch) | |
tree | 9797483bceccbc98ec0959b08a00f829d9fde9ea /fs | |
parent | 814ce69432bffdd0533fda28deea5dcfba153d17 (diff) |
ocfs2/dlm: fix a variable overflow problem in dlmdomain.c
In dlm_send_join_cancels(), node is defined with type unsigned int, but
initialized with -1, this will lead variable overflow. Although this
won't cause any runtime problem, the code looks a little uncoordinated.
Signed-off-by: Jun Piao <piaojun@huawei.com>
Reviewed-by: Joseph Qi <joseph.qi@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ocfs2/dlm/dlmdomain.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c index c73c68efdf67..12e064b8be9a 100644 --- a/fs/ocfs2/dlm/dlmdomain.c +++ b/fs/ocfs2/dlm/dlmdomain.c | |||
@@ -1399,7 +1399,7 @@ static int dlm_send_join_cancels(struct dlm_ctxt *dlm, | |||
1399 | unsigned int map_size) | 1399 | unsigned int map_size) |
1400 | { | 1400 | { |
1401 | int status, tmpstat; | 1401 | int status, tmpstat; |
1402 | unsigned int node; | 1402 | int node; |
1403 | 1403 | ||
1404 | if (map_size != (BITS_TO_LONGS(O2NM_MAX_NODES) * | 1404 | if (map_size != (BITS_TO_LONGS(O2NM_MAX_NODES) * |
1405 | sizeof(unsigned long))) { | 1405 | sizeof(unsigned long))) { |