mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
ocfs2/dlm: don't access beyond bitmap size
dlm->recovery_map is defined as unsigned long recovery_map[BITS_TO_LONGS(O2NM_MAX_NODES)]; We should treat O2NM_MAX_NODES as the bit map size in bits. This patches fixes a bit operation that takes O2NM_MAX_NODES + 1 as bitmap size. Signed-off-by: Wengang Wang <[email protected]> Signed-off-by: Joel Becker <[email protected]>
This commit is contained in:
parent
693c241a5f
commit
f471c9df92
1 changed files with 1 additions and 1 deletions
|
|
@ -463,7 +463,7 @@ static int dlm_do_recovery(struct dlm_ctxt *dlm)
|
|||
if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) {
|
||||
int bit;
|
||||
|
||||
bit = find_next_bit (dlm->recovery_map, O2NM_MAX_NODES+1, 0);
|
||||
bit = find_next_bit (dlm->recovery_map, O2NM_MAX_NODES, 0);
|
||||
if (bit >= O2NM_MAX_NODES || bit < 0)
|
||||
dlm_set_reco_dead_node(dlm, O2NM_INVALID_NODE_NUM);
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue