From: Joseph Qi <joseph.qi@huawei.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2/dlm: fix a variable overflow problem in dlmdomain.c
Date: Mon, 14 Mar 2016 20:21:50 +0800 [thread overview]
Message-ID: <56E6ACDE.6080900@huawei.com> (raw)
In-Reply-To: <56E6A713.1030604@huawei.com>
On 2016/3/14 19:57, piaojun wrote:
> 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 <piaojun@huawei.com>
> Reviewed-by: Joseph Qi <joseph.qi@huawei.com>
> ---
> dlm/dlmdomain.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/dlm/dlmdomain.c b/dlm/dlmdomain.c
> index 2ee7fe7..61bafa7 100644
> --- a/dlm/dlmdomain.c
> +++ b/dlm/dlmdomain.c
> @@ -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.
>
> if (map_size != (BITS_TO_LONGS(O2NM_MAX_NODES) *
> sizeof(unsigned long))) {
>
next prev parent reply other threads:[~2016-03-14 12:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-14 11:57 [Ocfs2-devel] [PATCH] ocfs2/dlm: fix a variable overflow problem in dlmdomain.c piaojun
2016-03-14 12:21 ` Joseph Qi [this message]
2016-03-14 12:44 ` piaojun
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=56E6ACDE.6080900@huawei.com \
--to=joseph.qi@huawei.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.