From: Sunil Mushran <sunil.mushran@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2/dlm: don't access beyond bitmap size
Date: Wed, 30 Jun 2010 09:52:34 -0700 [thread overview]
Message-ID: <4C2B7652.8010603@oracle.com> (raw)
In-Reply-To: <201006301224.o5U1mkX5011318@acsinet15.oracle.com>
Signed-off-by: Sunil Mushran<sunil.mushran@oracle.com>
On 06/30/2010 05:23 AM, Wengang Wang wrote:
> 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<wen.gang.wang@oracle.com>
> ---
> fs/ocfs2/dlm/dlmrecovery.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
> index f8b75ce..9dfaac7 100644
> --- a/fs/ocfs2/dlm/dlmrecovery.c
> +++ b/fs/ocfs2/dlm/dlmrecovery.c
> @@ -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
>
next prev parent reply other threads:[~2010-06-30 16:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-30 12:23 [Ocfs2-devel] [PATCH] ocfs2/dlm: don't access beyond bitmap size Wengang Wang
2010-06-30 16:52 ` Sunil Mushran [this message]
2010-07-12 18:32 ` Joel Becker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C2B7652.8010603@oracle.com \
--to=sunil.mushran@oracle.com \
--cc=ocfs2-devel@oss.oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.