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] [day] [month] [year] [list]
Date:	Sat, 20 Mar 2010 20:59:23 -0700 (PDT)
From:	Sage Weil <sage@...dream.net>
To:	Dan Carpenter <error27@...il.com>
cc:	ceph-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [ceph-devel] bug report: ceph: && vs ||

On Sat, 20 Mar 2010, Dan Carpenter wrote:
> 
> 
>   1772          /* correct session? */
>   1773          if (!req->r_session && req->r_session != session) {
> 
> 	Is this supposed to || here?  We know "session" is non-NULL at
> 	the point because we already dereferenced it.  If "req->r_session"
> 	is null then the second condition is always true.
> 
> 	Also we dereference "req->r_session" later on without checking.

Yeah, that check is clearly wrong.  A

	if (req->r_session != session) {

is sufficient because the passed session is always non-NULL.  Applied a 
fix.

Thanks-
sage
--
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