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: <1335960469.10293.49.camel@sauron.fi.intel.com>
Date:	Wed, 02 May 2012 15:07:49 +0300
From:	Artem Bityutskiy <dedekind1@...il.com>
To:	Julia Lawall <julia.lawall@...6.fr>
Cc:	dwmw2@...radead.org, linux-mtd@...ts.infradead.org,
	linux-kernel@...r.kernel.org
Subject: Re: question about fs/jffs2/readinode.c

On Sat, 2012-04-28 at 07:06 +0200, Julia Lawall wrote:
> The function read_direntry in fs/jffs2/readinode.c contains the following 
> code:
> 
>          err = jffs2_flash_read(c, (ref_offset(ref)) + read,
>                                 rd->nsize - already, &read, &fd->name[already]);
>  	if (unlikely(read != rd->nsize - already) && likely(!err))
>                        return -EIO;
> 
>          if (unlikely(err)) {
>                  JFFS2_ERROR("read remainder of name: error %d\n", err);
>                  jffs2_free_full_dirent(fd);
>                  return -EIO;
>          }
> 
> Is it intentional that the first if doesn't free fd?  At first I thought 
> that that might be the case, because what would be the point of having two 
> conditionals if they are going to do the same thing.  But I can't see why 
> fd should not be freed either, so maybe the two conditionals are just 
> there to give different error messages?

Hi Julia,

I think this is a bug and thes conditionals can be joined into one.

-- 
Best Regards,
Artem Bityutskiy

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ