ocfs2/dlm: fix a variable overflow problem in dlmdomain.c
PATCH 1/1 ocfs2/dlm: fix a variable overflow problem in dlmdomain.c
In dlm_send_join_cancels(), unsigned int node is assigned -1, this will lead variable overflow. Although this won't cause any runtime problem, the code looks a little uncoordinated.
--- dlm/dlmdomain.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
dlm/dlmdomain.c +1 -2
@@ -1395,8 +1395,7 @@ static int dlm_send_join_cancels(struct dlm_ctxt *dlm,unsigned long *node_map, unsigned int map_size) { - int status, tmpstat; -unsigned int node; + int status, tmpstat, int node;if (map_size != (BITS_TO_LONGS (O2NM_MAX_NODES ) *sizeof (unsigned long ))) {
Signature · 1 line
1.8.4.3
PATCH 1/1 ocfs2/dlm: fix a variable overflow problem in dlmdomain.c
Quoted 15 lines · piaojun
In
dlm_send_join_cancels(), unsigned int node is assigned -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 <[email protected]>Reviewed-by Joseph Qi <[email protected]>--- dlm/dlmdomain.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)dlm/dlmdomain.c +0
-0
dlm/dlmdomain.c static int dlm_send_join_cancels(struct dlm_ctxt *dlm, · line 1398
Quoted 6 lines
dlm/dlmdomain.c +1
-2@@ -1395,8 +1395,7 @@ static int dlm_send_join_cancels(struct dlm_ctxt *dlm,unsigned long *node_map, unsigned int map_size) { - int status, tmpstat; -unsigned int node; + int status, tmpstat, int node;
This is not right. NAK.
Quoted 4 lines
dlm/dlmdomain.c +0
-0if (map_size != (BITS_TO_LONGS (O2NM_MAX_NODES ) *sizeof (unsigned long ))) {
PATCH 1/1 ocfs2/dlm: fix a variable overflow problem in dlmdomain.c
Quoted 11 lines · Joseph Qi
Quoted 10 lines · piaojun
In
dlm_send_join_cancels(), unsigned int node is assigned -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 <[email protected]>Reviewed-by Joseph Qi <[email protected]>--- dlm/dlmdomain.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Quoted 13 lines
dlm/dlmdomain.c static int dlm_send_join_cancels(struct dlm_ctxt *dlm, · line 1398
Quoted 11 lines
dlm/dlmdomain.c +1
-2@@ -1395,8 +1395,7 @@ static int dlm_send_join_cancels(struct dlm_ctxt *dlm,unsigned long *node_map, unsigned int map_size) { - int status, tmpstat; -unsigned int node; + int status, tmpstat, int node;This is not right. NAK.
Hi Joseph Qi, Thanks for your prompt, I have sent a V2 patch to fix this.
Quoted 9 lines
dlm/dlmdomain.c static int dlm_send_join_cancels(struct dlm_ctxt *dlm,
Quoted 4 lines
dlm/dlmdomain.c +0
-0if (map_size != (BITS_TO_LONGS (O2NM_MAX_NODES ) *sizeof (unsigned long ))) {.