• Vladimir Oltean's avatar
    net/sched: taprio: use rtnl_dereference for oper and admin sched in taprio_destroy() · 9af23657
    Vladimir Oltean authored
    Sparse complains that taprio_destroy() dereferences q->oper_sched and
    q->admin_sched without rcu_dereference(), since they are marked as __rcu
    in the taprio private structure.
    
    1671:28: warning: incorrect type in argument 1 (different address spaces)
    1671:28:    expected struct callback_head *head
    1671:28:    got struct callback_head [noderef] __rcu *
    1674:28: warning: incorrect type in argument 1 (different address spaces)
    1674:28:    expected struct callback_head *head
    1674:28:    got struct callback_head [noderef] __rcu *
    
    To silence that build warning, do actually use rtnl_dereference(), since
    we know the rtnl_mutex is held at the time of q->destroy().
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    9af23657
sch_taprio.c 51.7 KB