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: <20090216072711.GJ30821@kernel.dk>
Date:	Mon, 16 Feb 2009 08:27:11 +0100
From:	Jens Axboe <jens.axboe@...cle.com>
To:	"Michael S. Tsirkin" <m.s.tsirkin@...il.com>
Cc:	pavel@...e.cz, rjw@...k.pl, linux-pm@...ts.linux-foundation.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	bugme-daemon@...zilla.kernel.org
Subject: Re: [Bug 12713] Hang on resume from hibernation, apparently as result of 213d9417fec

On Mon, Feb 16 2009, Michael S. Tsirkin wrote:
> On Mon, Feb 16, 2009 at 2:05 AM, Michael S. Tsirkin
> <m.s.tsirkin@...il.com> wrote:
> > Summary: seem to need to revert 213d9417fec62ef4c3675621b9364a667954d4dd
> > to fix resume from hibernation. Bugzilla entry created:
> > http://bugzilla.kernel.org/show_bug.cgi?id=12713
> 
> Looking over this, I see something strange in the commit in question:
> 
> diff --git a/include/linux/bio.h b/include/linux/bio.h
> index 5175aa3..f53568c 100644
> --- a/include/linux/bio.h
> +++ b/include/linux/bio.h
> @@ -163,12 +163,15 @@ struct bio {
>  #define BIO_RW         0       /* Must match RW in req flags (blkdev.h) */
>  #define BIO_RW_AHEAD   1       /* Must match FAILFAST in req flags */
>  #define BIO_RW_BARRIER 2
> -#define BIO_RW_SYNC    3
> -#define BIO_RW_META    4
> -#define BIO_RW_DISCARD 5
> -#define BIO_RW_FAILFAST_DEV            6
> -#define BIO_RW_FAILFAST_TRANSPORT      7
> -#define BIO_RW_FAILFAST_DRIVER         8
> +#define BIO_RW_SYNCIO  3
> +#define BIO_RW_UNPLUG  4
> +#define BIO_RW_META    5
> +#define BIO_RW_DISCARD 6
> +#define BIO_RW_FAILFAST_DEV            7
> +#define BIO_RW_FAILFAST_TRANSPORT      8
> +#define BIO_RW_FAILFAST_DRIVER         9
> +
> +#define BIO_RW_SYNC    (BIO_RW_SYNCIO | BIO_RW_UNPLUG)
> 
>  /*
>   * upper 16 bits of bi_rw define the io priority of this bio
> 
> I haven't read the code in depth, but taking running numbers and doing
> bitwise "or"
> on them looks a bit strange to me.
> So here BIO_RW_SYNC is (3 | 4) = 7, that is the same as BIO_RW_FAILFAST_DEV.
> So for example bio_failfast_dev and bio_sync are the same.
> 
> Jens, could you comment on this please? Is this intentional?

That's clearly a braino, you can't OR the shift values of course. I'll
get it fixed up asap!

-- 
Jens Axboe

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