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]
Date:	Thu, 11 Jan 2007 11:29:01 -0800
From:	Andrew Morton <akpm@...l.org>
To:	Michael Reed <mdr@....com>
Cc:	"Chen, Kenneth W" <kenneth.w.chen@...el.com>,
	"'Zach Brown'" <zach.brown@...cle.com>,
	"'Chris Mason'" <chris.mason@...cle.com>,
	Christoph Hellwig <hch@...radead.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Jeremy Higdon <jeremy@....com>, David Chinner <dgc@....com>
Subject: Re: [patch] optimize o_direct on block device - v3

On Thu, 11 Jan 2007 13:21:57 -0600
Michael Reed <mdr@....com> wrote:

> Testing on my ia64 system reveals that this patch introduces a
> data integrity error for direct i/o to a block device.  Device
> errors which result in i/o failure do not propagate to the
> process issuing direct i/o to the device.
> 
> This can be reproduced by doing writes to a fibre channel block
> device and then disabling the switch port connecting the host
> adapter to the switch.
> 

Does this fix it?

<thwaps Ken>
<thwaps compiler>
<adds new entry to Documentation/SubmitChecklist>

diff -puN fs/block_dev.c~a fs/block_dev.c
--- a/fs/block_dev.c~a
+++ a/fs/block_dev.c
@@ -146,7 +146,7 @@ static int blk_end_aio(struct bio *bio, 
 		iocb->ki_nbytes = -EIO;
 
 	if (atomic_dec_and_test(bio_count)) {
-		if (iocb->ki_nbytes < 0)
+		if ((long)iocb->ki_nbytes < 0)
 			aio_complete(iocb, iocb->ki_nbytes, 0);
 		else
 			aio_complete(iocb, iocb->ki_left, 0);
_


-
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