lkml.org 
[lkml]   [2006]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 12/25] NTFS: Critical bug fix (affects MIPS and possibly others)
    -stable review patch.  If anyone has any objections, please let us know.
    ------------------

    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.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);
    }

    /**
    --
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-06-27 22:18    [W:4.194 / U:0.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site