• Jeremy Kerr's avatar
    mctp: locking, lifetime and validity changes for sk_keys · 73c61845
    Jeremy Kerr authored
    We will want to invalidate sk_keys in a future change, which will
    require a boolean flag to mark invalidated items in the socket & net
    namespace lists. We'll also need to take a reference to keys, held over
    non-atomic contexts, so we need a refcount on keys also.
    
    This change adds a validity flag (currently always true) and refcount to
    struct mctp_sk_key.  With a refcount on the keys, using RCU no longer
    makes much sense; we have exact indications on the lifetime of keys. So,
    we also change the RCU list traversal to a locked implementation.
    Signed-off-by: default avatarJeremy Kerr <jk@codeconstruct.com.au>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    73c61845
route.c 26.1 KB