Skip to content
  • Rana Shahout's avatar
    net/mlx5e: Avoid accessing NULL pointer at ndo_select_queue · 5283af89
    Rana Shahout authored
    
    
    To avoid multiply/division operations on the data path,
    we hold a {channel, tc}==>txq mapping table.
    We held this mapping table inside the channel object that is
    being destroyed upon some configuration operations (e.g MTU change).
    So in case ndo_select_queue occurs during such a configuration operation,
    it may access a NULL channel pointer, resulting in kernel panic.
    To fix this issue we moved the {channel, tc}==>txq mapping table
    outside the channel object so that it will be available also
    during such configuration operations.
    
    Signed-off-by: default avatarRana Shahout <ranas@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5283af89