Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d67d3c2 authored by Jun Piao's avatar Jun Piao Committed by Linus Torvalds
Browse files

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: default avatarJun Piao <piaojun@huawei.com>
Reviewed-by: default avatarJoseph 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 814ce694
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1399,7 +1399,7 @@ static int dlm_send_join_cancels(struct dlm_ctxt *dlm,
				 unsigned int map_size)
{
	int status, tmpstat;
	unsigned int node;
	int node;

	if (map_size != (BITS_TO_LONGS(O2NM_MAX_NODES) *
			 sizeof(unsigned long))) {