From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 4/8] gfs2_convert: Fix null pointer deref in journ_space_to_rg
Date: Wed, 11 Jan 2012 18:21:18 +0000 [thread overview]
Message-ID: <1326306082-20381-4-git-send-email-anprice@redhat.com> (raw)
In-Reply-To: <1326306082-20381-1-git-send-email-anprice@redhat.com>
Spotted by coverity: Dereferencing null variable "rgdhigh".
Signed-off-by: Andrew Price <anprice@redhat.com>
---
gfs2/convert/gfs2_convert.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gfs2/convert/gfs2_convert.c b/gfs2/convert/gfs2_convert.c
index 307b0f3..9b54670 100644
--- a/gfs2/convert/gfs2_convert.c
+++ b/gfs2/convert/gfs2_convert.c
@@ -1777,13 +1777,13 @@ static int journ_space_to_rg(struct gfs2_sbd *sdp)
(rgd->ri.ri_addr > rgdhigh->ri.ri_addr)))
rgdhigh = rgd;
} /* for each rg */
- log_info(_("Addr 0x%llx comes after rg at addr 0x%llx\n"),
- (unsigned long long)jndx->ji_addr,
- (unsigned long long)rgdhigh->ri.ri_addr);
if (!rgdhigh) { /* if we somehow didn't find one. */
log_crit(_("Error: No suitable rg found for journal.\n"));
return -1;
}
+ log_info(_("Addr 0x%llx comes after rg at addr 0x%llx\n"),
+ (unsigned long long)jndx->ji_addr,
+ (unsigned long long)rgdhigh->ri.ri_addr);
ri_addr = jndx->ji_addr;
/* Allocate a new rgd entry which includes rg and ri. */
rgd = rgrp_insert(&sdp->rgtree, ri_addr);
--
1.7.6.5
next prev parent reply other threads:[~2012-01-11 18:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-11 18:21 [Cluster-devel] [PATCH 1/8] gfs2_edit: Check more error values from gfs2_get_bitmap Andrew Price
2012-01-11 18:21 ` [Cluster-devel] [PATCH 2/8] gfs2_edit: Fix another resource leak in display_extended Andrew Price
2012-01-11 18:21 ` [Cluster-devel] [PATCH 3/8] mkfs.gfs2: Fix use of uninitialized value in check_dev_content Andrew Price
2012-01-11 18:21 ` Andrew Price [this message]
2012-01-11 18:21 ` [Cluster-devel] [PATCH 5/8] gfs2_convert: Fix null pointer deref in conv_build_jindex Andrew Price
2012-01-11 18:21 ` [Cluster-devel] [PATCH 6/8] fsck.gfs2: Remove unsigned comparisons with zero Andrew Price
2012-01-11 18:21 ` [Cluster-devel] [PATCH 7/8] fsck.gfs2: Plug a leak in init_system_inodes() Andrew Price
2012-01-11 18:21 ` [Cluster-devel] [PATCH 8/8] libgfs2: Set errno in dirent_alloc and use dir_add consistently Andrew Price
2012-01-11 18:28 ` Bob Peterson
2012-01-11 18:43 ` Abhijith Das
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=1326306082-20381-4-git-send-email-anprice@redhat.com \
--to=anprice@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).