mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 05:11:48 +00:00
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>
This commit is contained in:
parent
814ce69432
commit
8d67d3c244
@ -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))) {
|
||||
|
Loading…
Reference in New Issue
Block a user