lkml.org 
[lkml]   [2008]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 1/4] autofs4 - check for invalid dentry in getpath
    Hi Andrew,

    Patch to catch invalid dentry when calculating it's path.

    Signed-off-by: Ian Kent <raven@themaw.net>

    Ian

    ---
    diff -up linux-2.6.25-rc2-mm1/fs/autofs4/waitq.c.getpath-check-valid-dentry linux-2.6.25-rc2-mm1/fs/autofs4/waitq.c
    --- linux-2.6.25-rc2-mm1/fs/autofs4/waitq.c.getpath-check-valid-dentry 2008-02-20 12:55:39.000000000 +0900
    +++ linux-2.6.25-rc2-mm1/fs/autofs4/waitq.c 2008-02-20 12:54:46.000000000 +0900
    @@ -171,7 +171,7 @@ static int autofs4_getpath(struct autofs
    for (tmp = dentry ; tmp != root ; tmp = tmp->d_parent)
    len += tmp->d_name.len + 1;

    - if (--len > NAME_MAX) {
    + if (!len || --len > NAME_MAX) {
    spin_unlock(&dcache_lock);
    return 0;
    }

    \
     
     \ /
      Last update: 2008-02-26 04:29    [W:0.018 / U:30.568 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site