]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Add NTFS fix for 2.6.16 queue
authorChris Wright <chrisw@sous-sol.org>
Tue, 20 Jun 2006 10:21:37 +0000 (03:21 -0700)
committerChris Wright <chrisw@sous-sol.org>
Tue, 20 Jun 2006 10:21:37 +0000 (03:21 -0700)
queue-2.6.16/ntfs-critical-bug-fix.patch [new file with mode: 0644]
queue-2.6.16/series

diff --git a/queue-2.6.16/ntfs-critical-bug-fix.patch b/queue-2.6.16/ntfs-critical-bug-fix.patch
new file mode 100644 (file)
index 0000000..3ee3d63
--- /dev/null
@@ -0,0 +1,50 @@
+From stable-bounces@linux.kernel.org  Tue Jun 20 00:30:20 2006
+Date: Tue, 20 Jun 2006 00:29:41 -0700
+From: akpm@osdl.org
+To: aia21@cam.ac.uk, aia21@cantab.net, stable@kernel.org
+Cc: 
+Subject: NTFS: Critical bug fix (affects MIPS and possibly others)
+
+From: Anton Altaparmakov <aia21@cam.ac.uk>
+
+It fixes a crash in NTFS on architectures where flush_dcache_page()
+is a real function.  I never noticed this as all my testing is done on
+i386 where flush_dcache_page() is NULL.
+
+http://bugzilla.kernel.org/show_bug.cgi?id=6700
+
+Many thanks to Pauline Ng for the detailed bug report and analysis!
+
+Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
+Cc: <stable@kernel.org>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+---
+
+ fs/ntfs/file.c |   13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+--- linux-2.6.16.21.orig/fs/ntfs/file.c
++++ linux-2.6.16.21/fs/ntfs/file.c
+@@ -1489,14 +1489,15 @@ static inline void ntfs_flush_dcache_pag
+               unsigned nr_pages)
+ {
+       BUG_ON(!nr_pages);
++      /*
++       * Warning: Do not do the decrement at the same time as the call to
++       * flush_dcache_page() because it is a NULL macro on i386 and hence the
++       * decrement never happens so the loop never terminates.
++       */
+       do {
+-              /*
+-               * Warning: Do not do the decrement at the same time as the
+-               * call because flush_dcache_page() is a NULL macro on i386
+-               * and hence the decrement never happens.
+-               */
++              --nr_pages;
+               flush_dcache_page(pages[nr_pages]);
+-      } while (--nr_pages > 0);
++      } while (nr_pages > 0);
+ }
+ /**
index e0b81a963bdf5f293827012c59c94f00110d5c6b..8c8a3b1e25d7ea00b8e4c71e7702f3c13d0e4796 100644 (file)
@@ -10,3 +10,4 @@ jfs-fix-multiple-errors-in-metapage_releasepage.patch
 scsi_lib.c-properly-count-the-number-of-pages-in-scsi_req_map_sg.patch
 i2o-bugfixes-to-get-i2o-working-again.patch
 powernow-k8-crash-workaround.patch
+ntfs-critical-bug-fix.patch