• Julian Wiedmann's avatar
    s390/qeth: check dst entry before use · a4c17bff
    Julian Wiedmann authored
    [ Upstream commit 0cd6783d ]
    
    While qeth_l3 uses netif_keep_dst() to hold onto the dst, a skb's dst
    may still have been obsoleted (via dst_dev_put()) by the time that we
    end up using it. The dst then points to the loopback interface, which
    means the neighbour lookup in qeth_l3_get_cast_type() determines a bogus
    cast type of RTN_BROADCAST.
    For IQD interfaces this causes us to place such skbs on the wrong
    HW queue, resulting in TX errors.
    
    Fix-up the various call sites to first validate the dst entry with
    dst_check(), and fall back accordingly.
    Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    a4c17bff
qeth_l3_main.c 67.3 KB