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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 20 Jun 2014 12:30:42 -0400
From:	Nick Krause <xerofoify@...il.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	akpm@...ux-foundation.org, viro@...iv.linux.org.uk, fabf@...net.be,
	kirill.shutemov@...ux.intel.com, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Check for Null return of function of affs_bread in
 function affs_truncate

Ok that's fine I would return as if it's a NULL the other parts of the
function can't continue.
Nick

On Thu, Jun 19, 2014 at 1:21 AM, Dan Carpenter <dan.carpenter@...cle.com> wrote:
> On Wed, Jun 18, 2014 at 06:08:05PM -0400, Nicholas Krause wrote:
>> Signed-off-by: Nicholas Krause <xerofoify@...il.com>
>> ---
>>  fs/affs/file.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/fs/affs/file.c b/fs/affs/file.c
>> index a7fe57d..f26482d 100644
>> --- a/fs/affs/file.c
>> +++ b/fs/affs/file.c
>> @@ -923,6 +923,8 @@ affs_truncate(struct inode *inode)
>>
>>       while (ext_key) {
>>               ext_bh = affs_bread(sb, ext_key);
>> +             if (!ext_bh)
>> +                     return;
>
> The problem is that we don't know if we should return here or break
> here.  If you don't understand the code, then it's best to just leave it
> alone.
>
> regards,
> dan carpenter
>
>>               size = AFFS_SB(sb)->s_hashsize;
>>               if (size > blkcnt - blk)
>>                       size = blkcnt - blk;
>> --
>> 1.9.1
--
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