/[linux-patches]/genpatches-2.6/trunk/2.6.14/1140_4_cciss-big-pass-thru.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.14/1140_4_cciss-big-pass-thru.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 292 - (show annotations) (download) (as text)
Tue Jan 31 21:50:53 2006 UTC (14 years, 9 months ago) by johnm
File MIME type: text/x-diff
File size: 1326 byte(s)
Large update - thanks goes to Kerin Millar for the legwork.
1 From stable-bounces@linux.kernel.org Mon Dec 12 12:32:44 2005
2 Date: Fri, 18 Nov 2005 14:02:54 -0800
3 Message-Id: <200511182202.jAIM2sSF008196@hera.kernel.org>
4 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
5 To: git-commits-head@vger.kernel.org
6 Cc:
7 Subject: cciss: bug fix for BIG_PASS_THRU
8
9 From: Jens Axboe <axboe@suse.de>
10
11 Applications using CCISS_BIG_PASSTHRU complained that the data written
12 was zeros. The problem is that the buffer is being cleared after the
13 user copy, unless the user copy has failed... Correct that logic.
14
15 Signed-off-by: Mike Miller <mike.miller@hp.com>
16 Signed-off-by: Jens Axboe <axboe@suse.de>
17 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18
19 ---
20 drivers/block/cciss.c | 7 ++++---
21 1 file changed, 4 insertions(+), 3 deletions(-)
22
23 --- linux-2.6.14.3.orig/drivers/block/cciss.c
24 +++ linux-2.6.14.3/drivers/block/cciss.c
25 @@ -1016,10 +1016,11 @@ static int cciss_ioctl(struct inode *ino
26 status = -ENOMEM;
27 goto cleanup1;
28 }
29 - if (ioc->Request.Type.Direction == XFER_WRITE &&
30 - copy_from_user(buff[sg_used], data_ptr, sz)) {
31 + if (ioc->Request.Type.Direction == XFER_WRITE) {
32 + if (copy_from_user(buff[sg_used], data_ptr, sz)) {
33 status = -ENOMEM;
34 - goto cleanup1;
35 + goto cleanup1;
36 + }
37 } else {
38 memset(buff[sg_used], 0, sz);
39 }

  ViewVC Help
Powered by ViewVC 1.1.20