From: Chris Wright Date: Tue, 20 Jun 2006 08:16:34 +0000 (-0700) Subject: NTFS bugfix for http://bugzilla.kernel.org/show_bug.cgi?id=6700, fwd from akpm. X-Git-Tag: v2.6.16.21~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ebb054a3b20813a71bb10e31851ff62af2260e08;p=thirdparty%2Fkernel%2Fstable-queue.git NTFS bugfix for http://bugzilla.kernel.org/show_bug.cgi?id=6700, fwd from akpm. --- diff --git a/queue-2.6.17/ntfs-critical-bug-fix.patch b/queue-2.6.17/ntfs-critical-bug-fix.patch new file mode 100644 index 00000000000..43bc3931d22 --- /dev/null +++ b/queue-2.6.17/ntfs-critical-bug-fix.patch @@ -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 + +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 +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Chris Wright +--- + + fs/ntfs/file.c | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +--- linux-2.6.17.1.orig/fs/ntfs/file.c ++++ linux-2.6.17.1/fs/ntfs/file.c +@@ -1484,14 +1484,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); + } + + /** diff --git a/queue-2.6.17/series b/queue-2.6.17/series index 302f6f43092..c96386b452e 100644 --- a/queue-2.6.17/series +++ b/queue-2.6.17/series @@ -9,3 +9,4 @@ sctp-send-only-1-window-update-sack-per-message.patch sctp-fix-persistent-slowdown-in-sctp-when-a-gap-ack-consumes-rx-buffer.patch ethtool-fix-ufo-typo.patch sparc32-fix-iommu_flush_iotlb-end-address.patch +ntfs-critical-bug-fix.patch