rpms/kernel/F-9 linux-2.6-xfs-small-buffer-reads.patch,1.1,1.2
Chuck Ebbert (cebbert)
fedora-extras-commits at redhat.com
Tue May 27 22:39:48 UTC 2008
- Previous message (by thread): rpms/rpmlint/EL-5 .cvsignore, 1.18, 1.19 rpmlint-CHANGES.package.old, 1.1, 1.2 rpmlint.config, 1.8, 1.9 rpmlint.spec, 1.33, 1.34 sources, 1.18, 1.19
- Next message (by thread): rpms/kdebindings/devel kdebindings-4.0.80-lib64.patch, 1.1, 1.2 kdebindings.spec, 1.105, 1.106
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23650
Modified Files:
linux-2.6-xfs-small-buffer-reads.patch
Log Message:
replace w/ official patch
linux-2.6-xfs-small-buffer-reads.patch:
Index: linux-2.6-xfs-small-buffer-reads.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/linux-2.6-xfs-small-buffer-reads.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-xfs-small-buffer-reads.patch 16 May 2008 21:38:01 -0000 1.1
+++ linux-2.6-xfs-small-buffer-reads.patch 27 May 2008 22:38:58 -0000 1.2
@@ -1,67 +1,36 @@
-Fix memory corruption with small buffer reads
+From: Christoph Hellwig <hch at infradead.org>
+Date: Mon, 19 May 2008 06:34:42 +0000 (+1000)
+Subject: [XFS] Fix memory corruption with small buffer reads
+X-Git-Tag: v2.6.26-rc4~62^2
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=6ab455eeaff6893cd06da33843e840d888cdc04a
+
+[XFS] Fix memory corruption with small buffer reads
When we have multiple buffers in a single page for a blocksize == pagesize
filesystem we might overwrite the page contents if two callers hit it
-shortly after each other. To prevent that we need to keep the page
-locked until I/O is completed and the page marked uptodate.
+shortly after each other. To prevent that we need to keep the page locked
+until I/O is completed and the page marked uptodate.
Thanks to Eric Sandeen for triaging this bug and finding a reproducible
testcase and Dave Chinner for additional advice.
This should fix kernel.org bz #10421.
-
-Signed-off-by: Christoph Hellwig <hch at lst.de>
Tested-by: Eric Sandeen <sandeen at sandeen.net>
-Date: Fri May 16 12:10:56 AEST 2008
-Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs
-Inspected by: hch at lst.de
-
-The following file(s) were checked into:
- longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb
-
+SGI-PV: 981813
+SGI-Modid: xfs-linux-melb:xfs-kern:31173a
-Modid: xfs-linux-melb:xfs-kern:31173a
-fs/xfs/linux-2.6/xfs_buf.h - 1.125 - changed
-http://oss.sgi.com/cgi-bin/cvsweb.cgi/linux/fs/xfs-2.6/xfs_buf.h.diff?r1=text&tr1=1.125&r2=text&tr2=1.124&f=h
- - Reintroduce page locking for sub-blocksize buffer read synchronisation.
-
-fs/xfs/linux-2.6/xfs_buf.c - 1.256 - changed
-http://oss.sgi.com/cgi-bin/cvsweb.cgi/linux/fs/xfs-2.6/xfs_buf.c.diff?r1=text&tr1=1.256&r2=text&tr2=1.255&f=h
- - Reintroduce page locking for sub-blocksize buffer read synchronisation.
-
---- linux.orig/fs/xfs/linux-2.6/xfs_buf.h 2008/04/10 04:27:53 1.124
-+++ linux/fs/xfs/linux-2.6/xfs_buf.h 2008/05/16 04:28:49 1.125
-@@ -66,6 +66,25 @@ typedef enum {
- _XBF_PAGES = (1 << 18), /* backed by refcounted pages */
- _XBF_RUN_QUEUES = (1 << 19),/* run block device task queue */
- _XBF_DELWRI_Q = (1 << 21), /* buffer on delwri queue */
-+
-+ /*
-+ * Special flag for supporting metadata blocks smaller than a FSB.
-+ *
-+ * In this case we can have multiple xfs_buf_t on a single page and
-+ * need to lock out concurrent xfs_buf_t readers as they only
-+ * serialise access to the buffer.
-+ *
-+ * If the FSB size >= PAGE_CACHE_SIZE case, we have no serialisation
-+ * between reads of the page. Hence we can have one thread read the
-+ * page and modify it, but then race with another thread that thinks
-+ * the page is not up-to-date and hence reads it again.
-+ *
-+ * The result is that the first modifcation to the page is lost.
-+ * This sort of AGF/AGI reading race can happen when unlinking inodes
-+ * that require truncation and results in the AGI unlinked list
-+ * modifications being lost.
-+ */
-+ _XBF_PAGE_LOCKED = (1 << 22),
- } xfs_buf_flags_t;
-
- typedef enum {
---- linux.orig/fs/xfs/linux-2.6/xfs_buf.c 2008/05/09 04:27:47 1.255
-+++ linux/fs/xfs/linux-2.6/xfs_buf.c 2008/05/16 04:28:49 1.256
-@@ -386,6 +386,8 @@ _xfs_buf_lookup_pages(
+Signed-off-by: Christoph Hellwig <hch at infradead.org>
+Signed-off-by: David Chinner <dgc at sgi.com>
+Signed-off-by: Lachlan McIlroy <lachlan at sgi.com>
+---
+
+diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
+index 5105015..98e0e86 100644
+--- a/fs/xfs/linux-2.6/xfs_buf.c
++++ b/fs/xfs/linux-2.6/xfs_buf.c
+@@ -387,6 +387,8 @@ _xfs_buf_lookup_pages(
if (unlikely(page == NULL)) {
if (flags & XBF_READ_AHEAD) {
bp->b_page_count = i;
@@ -70,7 +39,7 @@
return -ENOMEM;
}
-@@ -415,17 +417,24 @@ _xfs_buf_lookup_pages(
+@@ -416,17 +418,24 @@ _xfs_buf_lookup_pages(
ASSERT(!PagePrivate(page));
if (!PageUptodate(page)) {
page_count--;
@@ -137,6 +106,33 @@
(blocksize >= PAGE_CACHE_SIZE)) {
bio = bio_alloc(GFP_NOIO, 1);
-
-
-
+diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h
+index 841d788..f948ec7 100644
+--- a/fs/xfs/linux-2.6/xfs_buf.h
++++ b/fs/xfs/linux-2.6/xfs_buf.h
+@@ -66,6 +66,25 @@ typedef enum {
+ _XBF_PAGES = (1 << 18), /* backed by refcounted pages */
+ _XBF_RUN_QUEUES = (1 << 19),/* run block device task queue */
+ _XBF_DELWRI_Q = (1 << 21), /* buffer on delwri queue */
++
++ /*
++ * Special flag for supporting metadata blocks smaller than a FSB.
++ *
++ * In this case we can have multiple xfs_buf_t on a single page and
++ * need to lock out concurrent xfs_buf_t readers as they only
++ * serialise access to the buffer.
++ *
++ * If the FSB size >= PAGE_CACHE_SIZE case, we have no serialisation
++ * between reads of the page. Hence we can have one thread read the
++ * page and modify it, but then race with another thread that thinks
++ * the page is not up-to-date and hence reads it again.
++ *
++ * The result is that the first modifcation to the page is lost.
++ * This sort of AGF/AGI reading race can happen when unlinking inodes
++ * that require truncation and results in the AGI unlinked list
++ * modifications being lost.
++ */
++ _XBF_PAGE_LOCKED = (1 << 22),
+ } xfs_buf_flags_t;
+
+ typedef enum {
- Previous message (by thread): rpms/rpmlint/EL-5 .cvsignore, 1.18, 1.19 rpmlint-CHANGES.package.old, 1.1, 1.2 rpmlint.config, 1.8, 1.9 rpmlint.spec, 1.33, 1.34 sources, 1.18, 1.19
- Next message (by thread): rpms/kdebindings/devel kdebindings-4.0.80-lib64.patch, 1.1, 1.2 kdebindings.spec, 1.105, 1.106
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list