lkml.org 
[lkml]   [2009]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] ext2: fix unbalanced kmap()/kunmap()
    On Sat, Sep 05, 2009 at 12:25:37AM -0400, Nicolas Pitre wrote:
    > In ext2_rename(), dir_page is acquired through ext2_dotdot(). It is
    > then released through ext2_set_link() but only if old_dir != new_dir.
    > Failing that, the pkmap reference count is never decremented and the
    > page remains pinned forever. Repeat that a couple times with highmem
    > pages and all pkmap slots get exhausted, and every further kmap() calls
    > end up stalling on the pkmap_map_wait queue at which point the whole
    > system comes to a halt.
    >
    > Signed-off-by: Nicolas Pitre <nico@marvell.com>

    Acked-by: "Theodore Ts'o" <tytso@mit.edu>

    > I ran into this issue while testing highmem on ARM by running the git
    > test suite in a loop with 3 parallel instances. Using the right mv
    > sequence in a script would constitute a pretty simple recipe for a
    > local DoS on systems running ext2 and highmem. No idea if ext3 or ext4
    > have the same issue.

    This is an ext2-only issue; for journalling reasons ext3 and ext4 read
    and write the directory via buffer heads. So this issue won't apply
    for ext3 or ext4.

    - Ted


    \
     
     \ /
      Last update: 2009-09-05 15:03    [W:0.039 / U:185.724 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site