]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/qeth: fix L2 header access in qeth_l3_osa_features_check()
authorJulian Wiedmann <jwi@linux.ibm.com>
Thu, 7 Jan 2021 17:24:42 +0000 (18:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Jan 2021 13:05:32 +0000 (14:05 +0100)
commitfc1c907da5a1a5a79f619b057f732fe21500c9ce
tree39771742ffcc98b2581ecc5619889fa94f6270e9
parente6931e3eb0845a4e5cc0fb81a29866e91ea63fa8
s390/qeth: fix L2 header access in qeth_l3_osa_features_check()

[ Upstream commit f9c4845385c8f6631ebd5dddfb019ea7a285fba4 ]

ip_finish_output_gso() may call .ndo_features_check() even before the
skb has a L2 header. This conflicts with qeth_get_ip_version()'s attempt
to inspect the L2 header via vlan_eth_hdr().

Switch to vlan_get_protocol(), as already used further down in the
common qeth_features_check() path.

Fixes: f13ade199391 ("s390/qeth: run non-offload L3 traffic over common xmit path")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/s390/net/qeth_l3_main.c