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: <25e057c01001071158n1755ee99iae17522e269aa1ff@mail.gmail.com>
Date:	Thu, 7 Jan 2010 20:58:10 +0100
From:	roel kluin <roel.kluin@...il.com>
To:	"Moore, Eric" <Eric.Moore@....com>
Cc:	"James E.J. Bottomley" <James.Bottomley@...e.de>,
	"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	"Desai, Kashyap" <Kashyap.Desai@....com>
Subject: Re: [PATCH] mpt2sas: Fix &&/|| confusion in _scsih_sas_device_status_change_event()

On Thu, Jan 7, 2010 at 8:31 PM, Moore, Eric <Eric.Moore@....com> wrote:
> nack
>
> The code beyond this check is intended for either INTERNAL_DEVICE_RESET or CMP_DEVICE_RESET.   If the reason code is something else, we will want to return.  There are 10 other types of reason codes besides these two. This proposed patch means we return only when the reason code is either INTERNAL_DEVICE_RESET or CMP_INTERNAL_RESET.
>
> Eric Moore

my patch is correct but my changelog was wrong. Sorry for the
confusion. It should have been:

Even if the ReasonCode is not INTERNAL_DEVICE_RESET nor CMP_DEVICE_RESET
this still evaluates to true.

you can test this with:

#include <stdio.h>

int main()
{
        int d;
        for (d=0;d<4;++d)
                printf("!(%d == 1 && %d == 2) = %d\n", d, d, !(d == 1
&& d == 2));
        for (d=0;d<4;++d)
                printf("!(%d == 1 || %d == 2) = %d\n", d, d, !(d == 1
|| d == 2));
        return 0;
}

Roel
--
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