lkml.org 
[lkml]   [2010]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/4] sysfs: Only take active references on attributes.
    On Mon, Feb 15, 2010 at 03:27:45PM +0800, Américo Wang wrote:
    >On Thu, Feb 11, 2010 at 03:20:00PM -0800, Eric W. Biederman wrote:
    >>
    >>If we exclude directories and symlinks from the set of sysfs
    >>dirents where we need active references we are left with
    >>sysfs attributes (binary or not).
    >>
    >>- Tweak sysfs_deactivate to only do something on attributes
    >>- Move lockdep initialization into sysfs_file_add_mode to
    >> limit it to just attributes.
    >
    >Why?
    >
    >If I read your patch correctly, s_active will be useless
    >for non-attributes sysfs entries? For sysfs dir, maybe,
    >since it can only be removed by sysfs_remove_dir(),
    >but not sure about sysfs symlinks...
    >

    For sysfs dir's, opening it will not get s_active,
    since it doesn't have .open member. But it does
    put s_active when removing it. This seems buggy?

    For symlinks, it seems sysfs totally ignores s_active,
    thus is safe for this patch.

    --
    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: 2010-02-15 09:15    [W:0.023 / U:2.104 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site