[lkml]   [2009]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 2/2] vfs: fix d_path() for unreachable paths
    On Mon, Sep 21, 2009 at 10:10:17AM -0400, Mike Frysinger wrote:

    > it works without having to copy & paste the same exact structures over
    > and over. a suggestion as how to do it cleanly without bloating the
    > code is certainly welcome. it doesnt really matter that it's on the
    > stack as the usage is small and d_path() is given the size of the
    > buffer, so it isnt going to overflow.

    Umm... Surely, you can put a CPU number + one bit into PDE->data? As in
    proc_create_data("icplb", ....., (void *)(cpu * 2))
    proc_create_data("dcplb", ....., (void *)(cpu * 2 + 1))
    struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode);
    unsigned long n = (unsigned long) pde->data;
    cpu = n / 2;
    is_D = n & 1;

    > > ??For another... locking in that loop
    > > over processes and VMAs of each looks very suspicios, while we are at it.
    > we've reviewed it several times and exercised it in multiple ways. so
    > unless you have a real idea of something being wrong, the code has
    > been vetted heavily.

    write_lock_irq tasklist_lock
    loop over processes
    get_task_mm [now VM is pinned down, but not locked]
    walk the VMA list without any locking

    Something on another CPU (you have SMP systems, judging by the previously
    discussed code, right?) does munmap().


     \ /
      Last update: 2009-09-21 16:41    [W:0.022 / U:2.340 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site