r1229 - in trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian: . patches
Christoph Hellwig
hch-guest@haydn.debian.org
Wed, 18 Aug 2004 12:13:48 -0600
Author: hch-guest
Date: 2004-08-18 12:13:37 -0600 (Wed, 18 Aug 2004)
New Revision: 1229
Added:
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-3
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/bio_uncopy_user-memleak.dpatch
Modified:
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
Log:
* Add bio_uncopy_user leak fix from Kurt Garloff (closes: #256871)
(Christoph Hellwig).
Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog 2004-08-18 18:05:49 UTC (rev 1228)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog 2004-08-18 18:13:37 UTC (rev 1229)
@@ -4,6 +4,9 @@
* Update documentation (Christoph Hellwig).
+ * Add bio_uncopy_user leak fix from Kurt Garloff (closes: #256871)
+ (Christoph Hellwig).
+
-- Andres Salomon <dilinger@voxel.net> Wed, 18 Aug 2004 02:13:56 -0400
kernel-source-2.6.8 (2.6.8-2) unstable; urgency=high
Added: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-3
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-3 2004-08-18 18:05:49 UTC (rev 1228)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-3 2004-08-18 18:13:37 UTC (rev 1229)
@@ -0,0 +1,35 @@
+alpha-epoch-comment
+alpha-termbits
+doc-post_halloween
+drivers-ftape
+drivers-ide-dma-blacklist-toshiba
+drivers-input-hiddev-HIDIOCGUCODE
+drivers-input-psaux-hacks
+drivers-net-8139too-locking
+drivers-net-tg3-readd
+drivers-scsi_changer
+drivers-scsi-generic_proc_info
+extraversion
+fs-asfs
+include-missing-includes
+ipsec-missing_wakeup
+modular-ide
+modular-ide-pnp
+modular-vesafb
+remove-references-to-removed-drivers
+x86-i486_emu
+marvell-mm
+marvell-pegasos-2
+powerpc-pegasos
+powerpc-g4-l2-flush-errata
+nfs-fix
+SG_IO-cap
+ia64-generic-no-smp
+ptmx-fix
+powerpc-ibm-240-e30
+xfs-ioctl32
+drivers-scsi-sym53c8xx_revert
+ia64-generic-no-smp-1-to-2
+ia64_cyclone_nosmp
+fix-sn_console-for-config_smp
+bio_uncopy_user-memleak
Added: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/bio_uncopy_user-memleak.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/bio_uncopy_user-memleak.dpatch 2004-08-18 18:05:49 UTC (rev 1228)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/bio_uncopy_user-memleak.dpatch 2004-08-18 18:13:37 UTC (rev 1229)
@@ -0,0 +1,44 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Fix big memory leak in bio_uncopy_user (SG_IO)
+## DP: Patch author: Kurt Garloff <garloff@suse.de>
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+@DPATCH@
+--- linux/fs/bio.c.orig 2004-08-14 07:37:15.000000000 +0200
++++ linux/fs/bio.c 2004-08-17 17:41:52.022012902 +0200
+@@ -388,20 +388,17 @@ int bio_uncopy_user(struct bio *bio)
+ struct bio_vec *bvec;
+ int i, ret = 0;
+
+- if (bio_data_dir(bio) == READ) {
+- char *uaddr = bio->bi_private;
+-
+- __bio_for_each_segment(bvec, bio, i, 0) {
+- char *addr = page_address(bvec->bv_page);
+-
+- if (!ret && copy_to_user(uaddr, addr, bvec->bv_len))
+- ret = -EFAULT;
++ char *uaddr = bio->bi_private;
++
++ __bio_for_each_segment(bvec, bio, i, 0) {
++ char *addr = page_address(bvec->bv_page);
++ if (bio_data_dir(bio) == READ && !ret &&
++ copy_to_user(uaddr, addr, bvec->bv_len))
++ ret = -EFAULT;
+
+- __free_page(bvec->bv_page);
+- uaddr += bvec->bv_len;
+- }
++ __free_page(bvec->bv_page);
++ uaddr += bvec->bv_len;
+ }
+-
+ bio_put(bio);
+ return ret;
+ }
+