FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 01-11-2012, 05:21 PM
Andrew Price
 
Default gfs2_convert: Fix null pointer deref in journ_space_to_rg

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
"),
- (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.
"));
return -1;
}
+ log_info(_("Addr 0x%llx comes after rg at addr 0x%llx
"),
+ (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
 

Thread Tools




All times are GMT. The time now is 03:33 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org