[lkml]   [2008]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectUsing sparse to catch invalid RCU dereferences?

    Just a thought, I haven't tried this yet because I'm not entirely sure
    it's actually correct. I was just thinking it should be possible to
    introduce something like

    #define __rcu __attribute__((address_space(3)))

    (for sparse only, of course) and then be able to say

    struct myfoo *foo __rcu;

    and sparse would warn on

    struct myfoo *bar = foo;

    but not on

    struct myfoo *bar = rcu_dereference(foo);

    by way of using __force inside rcu_dereference(), rcu_assign_pointer()

    Would this be feasible? Or should one actually use __bitwise/__force to
    also get the warning when assigning between two variables both marked

    [unhandled content-type:application/pgp-signature]
     \ /
      Last update: 2008-04-08 16:29    [W:0.018 / U:0.556 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site