lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <550B7518.7000701@huawei.com>
Date:	Fri, 20 Mar 2015 09:17:12 +0800
From:	Joseph Qi <joseph.qi@...wei.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	Daeseok Youn <daeseok.youn@...il.com>,
	<richard.weinberger@...il.com>, <mfasheh@...e.com>,
	<ocfs2-devel@....oracle.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [Ocfs2-devel] [PATCH 1/4 V2] ocfs2: use retval instead of status
 for checking error

Hi Andrew,

On 2015/3/20 6:23, Andrew Morton wrote:
> On Sat, 28 Feb 2015 08:48:40 +0900 Daeseok Youn <daeseok.youn@...il.com> wrote:
> 
>> The use of 'status' in __ocfs2_add_entry() can return wrong
>> status when some functions are failed.
>>
>> If ocfs2_journal_access_db() in __ocfs2_add_entry() is failed,
>> that status is saved to 'status' but return variable is 'retval'
>> which is saved 'success' status. In case of this,  __ocfs2_add_entry()
>> is failed but can be returned as 'success'.
>>
>> So replace 'status' with 'retval'.
>>
>> -						mlog_errno(status);
>> +					if (retval) {
>> +						mlog_errno(retval);
>>  						goto bail;
> 
> and
> 
> bail:
> 	if (retval)
> 		mlog_errno(retval);
> 
> 	return retval;
> }
> 
> so we'll clearly log the same error twice.
> 
IMO, if we only depends on the bail error log, we still don't know where
the error occurs.
So if we want to do the cleanup, the bail error log should be cleaned.

> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel@....oracle.com
> https://oss.oracle.com/mailman/listinfo/ocfs2-devel
> 
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ