rpms/kernel/F-10 linux-2.6-fuse-fix-lseek-return-with-lock-held.patch, NONE, 1.1 linux-2.6.29-pat-pci-change-prot-for-inherit.patch, NONE, 1.1 kernel.spec, 1.1311, 1.1312

Chuck Ebbert cebbert at fedoraproject.org
Tue Mar 31 00:20:14 UTC 2009


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv30734

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-fuse-fix-lseek-return-with-lock-held.patch 
	linux-2.6.29-pat-pci-change-prot-for-inherit.patch 
Log Message:
x86 PCI/PAT fix headed for -stable: inherit protections on mmap.
FUSE patch headed for -stable: don't return to user with lock held.

linux-2.6-fuse-fix-lseek-return-with-lock-held.patch:

--- NEW FILE linux-2.6-fuse-fix-lseek-return-with-lock-held.patch ---
Linus,

Please pull from:

  git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git for-linus

to get the following fix.

Thanks,
Miklos

---
commit 5291658d87ac1ae60418e79e7b6bad7d5f595e0c
Author: Dan Carpenter <error27 at gmail.com>
Date:   Fri Mar 27 13:36:10 2009 +0300

    fuse: fix fuse_file_lseek returning with lock held
    
    This bug was found with smatch (http://repo.or.cz/w/smatch.git/).  If
    we return directly the inode->i_mutex lock doesn't get released.
    
    Signed-off-by: Dan Carpenter <error27 at gmail.com>
    Signed-off-by: Miklos Szeredi <mszeredi at suse.cz>
    CC: stable at kernel.org
---
 fs/fuse/file.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index d9fdb7c..821d10f 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1465,7 +1465,7 @@ static loff_t fuse_file_llseek(struct file *file, loff_t offset, int origin)
 	case SEEK_END:
 		retval = fuse_update_attributes(inode, NULL, file, NULL);
 		if (retval)
-			return retval;
+			goto exit;
 		offset += i_size_read(inode);
 		break;
 	case SEEK_CUR:
@@ -1479,6 +1479,7 @@ static loff_t fuse_file_llseek(struct file *file, loff_t offset, int origin)
 		}
 		retval = offset;
 	}
+exit:
 	mutex_unlock(&inode->i_mutex);
 	return retval;
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
linux-2.6.29-pat-pci-change-prot-for-inherit.patch:

--- NEW FILE linux-2.6.29-pat-pci-change-prot-for-inherit.patch ---
From: Pallipadi, Venkatesh <venkatesh.pallipadi at intel.com>
Date: Mon, 23 Mar 2009 19:07:20 +0000 (-0700)
Subject: x86, PAT, PCI: Change vma prot in pci_mmap to reflect inherited prot
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=9cdec049389ce2c324fd1ec508a71528a27d4a07

x86, PAT, PCI: Change vma prot in pci_mmap to reflect inherited prot

While looking at the issue in the thread:

  http://marc.info/?l=dri-devel&m=123606627824556&w=2

noticed a bug in pci PAT code and memory type setting.

PCI mmap code did not set the proper protection in vma, when it
inherited protection in reserve_memtype. This bug only affects
the case where there exists a WC mapping before X does an mmap
with /proc or /sys pci interface. This will cause X userlevel
mmap from /proc or /sysfs to fail on fork.

Reported-by: Kevin Winchester <kjwinchester at gmail.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi at intel.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha at intel.com>
Cc: Jesse Barnes <jbarnes at virtuousgeek.org>
Cc: Dave Airlie <airlied at redhat.com>
Cc: <stable at kernel.org>
LKML-Reference: <20090323190720.GA16831 at linux-os.sc.intel.com>
Signed-off-by: Ingo Molnar <mingo at elte.hu>
---

diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index 5ead808..f234a37 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -319,6 +319,9 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
 			return -EINVAL;
 		}
 		flags = new_flags;
+		vma->vm_page_prot = __pgprot(
+			(pgprot_val(vma->vm_page_prot) & ~_PAGE_CACHE_MASK) |
+			flags);
 	}
 
 	if (((vma->vm_pgoff < max_low_pfn_mapped) ||


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-10/kernel.spec,v
retrieving revision 1.1311
retrieving revision 1.1312
diff -u -r1.1311 -r1.1312
--- kernel.spec	30 Mar 2009 23:31:15 -0000	1.1311
+++ kernel.spec	31 Mar 2009 00:19:44 -0000	1.1312
@@ -594,6 +594,7 @@
 
 Patch80: linux-2.6-vm-x86-pat-fix-warnings.patch
 Patch81: linux-2.6-defaults-saner-vm-settings.patch
+Patch82: linux-2.6.29-pat-pci-change-prot-for-inherit.patch
 
 Patch140: linux-2.6-ps3-ehci-iso.patch
 Patch141: linux-2.6-ps3-storage-alias.patch
@@ -673,6 +674,9 @@
 # fix stalls with ext3 data writeout
 Patch2950: linux-2.6-kjournald-use-rt-io-priority.patch
 
+# don't return to userspace w/ held lock
+Patch2960: linux-2.6-fuse-fix-lseek-return-with-lock-held.patch
+
 Patch3000: linux-2.6-btrfs-experimental-branch.patch
 
 Patch9000: squashfs3.patch
@@ -1081,6 +1085,7 @@
 # x86(-64)
 ApplyPatch linux-2.6-vm-x86-pat-fix-warnings.patch
 ApplyPatch linux-2.6-defaults-saner-vm-settings.patch
+ApplyPatch linux-2.6.29-pat-pci-change-prot-for-inherit.patch
 
 #
 # PowerPC
@@ -1122,6 +1127,8 @@
 
 ApplyPatch linux-2.6-kjournald-use-rt-io-priority.patch
 
+ApplyPatch linux-2.6-fuse-fix-lseek-return-with-lock-held.patch
+
 
 # ext4
 # data integrity band-aid for badly written apps
@@ -1820,6 +1827,10 @@
 %kernel_variant_files -k vmlinux %{with_kdump} kdump
 
 %changelog
+* Mon Mar 30 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.29-12
+- x86 PCI/PAT fix headed for -stable: inherit protections on mmap.
+- FUSE patch headed for -stable: don't return to user with lock held.
+
 * Mon Mar 30 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.29-11
 - Make the .shared-srctree file a list so more than two checkouts
   can share source files.




More information about the fedora-extras-commits mailing list