[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jfs-discussion
Subject:    Re: [Jfs-discussion] [BUG] segmentation fault in jfs_logdump
From:       Dave Kleikamp <shaggy () linux ! vnet ! ibm ! com>
Date:       2010-01-07 13:31:54
Message-ID: 1262871114.21718.12.camel () norville ! austin ! ibm ! com
[Download RAW message or body]

On Thu, 2010-01-07 at 13:03 +0100, Miklos Szeredi wrote:
> [Got the email address wrong...]
> 
> The return value of findLog() in jfs_logdump() is checked for being
> negative, but findLog() can return a positive error value.  In this
> case jfs_logdump() ingores the error and continues even though Log.fp
> is NULL.
> 
> See this bug report:
> 
>   https://bugzilla.novell.com/show_bug.cgi?id=545145
> 
> 
> The following patch should fix it.

Thanks Miklos.  Committed to cvs.

> Thanks,
> Miklos
> 
> Index: jfsutils-1.1.14/libfs/log_dump.c
> ===================================================================
> --- jfsutils-1.1.14.orig/libfs/log_dump.c	2006-06-05 21:31:41.000000000 +0200
> +++ jfsutils-1.1.14/libfs/log_dump.c	2010-01-07 12:57:36.782056072 +0100
> @@ -220,7 +220,7 @@ int jfs_logdump(caddr_t pathname, FILE *
>  		LogOpenMode = O_RDONLY;
>  		rc = findLog(fp, &in_use);
> 
> -		if (rc < 0) {
> +		if (rc != 0) {
>  			printf("JFS_LOGDUMP:Error occurred when open/read device\n");
>  			fprintf(outfp, "??????????????????????????????????????????????????????\n");
>  			fprintf(outfp, "JFS_LOGDUMP:Error occurred when open/read device\n");

What an annoying error message!  :-)

Shaggy
-- 
David Kleikamp
IBM Linux Technology Center


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Jfs-discussion mailing list
Jfs-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jfs-discussion
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic