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: <4A0D87F7.8090401@gmail.com>
Date:	Sat, 16 May 2009 00:19:19 +0900
From:	Tejun Heo <htejun@...il.com>
To:	Jens Axboe <jens.axboe@...cle.com>,
	James Bottomley <James.Bottomley@...senPartnership.com>,
	Boaz Harrosh <bharrosh@...asas.com>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	linux-scsi <linux-scsi@...r.kernel.org>,
	IDE/ATA development list <linux-ide@...r.kernel.org>,
	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>,
	Borislav Petkov <petkovbb@...glemail.com>,
	Pete Zaitcev <zaitcev@...hat.com>,
	Sergei Shtylyov <sshtylyov@...mvista.com>,
	Eric Moore <Eric.Moore@....com>,
	"Darrick J. Wong" <djwong@...ibm.com>
Subject: [PATCH block#for-2.6.31 3/3] bio: always copy back data for copied
 kernel requests

When a read bio_copy_kern() request fails, the content of the bounce
buffer is not copied back.  However, as request failure doesn't
necessarily mean complete failure, the buffer state can be useful.
This behavior is also inconsistent with the user map counterpart and
causes the subtle difference between bounced and unbounced IO causes
confusion.

This patch makes bio_copy_kern_endio() ignore @err and always copy
back data on request completion.

Signed-off-by: Tejun Heo <tj@...nel.org>
Cc: Jens Axboe <jens.axboe@...cle.com>
Cc: Boaz Harrosh <bharrosh@...asas.com>
Cc: James Bottomley <James.Bottomley@...senPartnership.com>
---
 fs/bio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: block/fs/bio.c
===================================================================
--- block.orig/fs/bio.c
+++ block/fs/bio.c
@@ -1198,7 +1198,7 @@ static void bio_copy_kern_endio(struct b
 		char *addr = page_address(bvec->bv_page);
 		int len = bmd->iovecs[i].bv_len;
 
-		if (read && !err)
+		if (read)
 			memcpy(p, addr, len);
 
 		__free_page(bvec->bv_page);
--
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