Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp22160pxb; Fri, 15 Jan 2021 04:56:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLczA0tVXxcXvzW2kWaN3+53eZDJKg6n76kKjMXYxR/Ztgip3n4pCAvBDWxgoo3avZFzAp X-Received: by 2002:a17:906:b09a:: with SMTP id x26mr8996414ejy.199.1610715402801; Fri, 15 Jan 2021 04:56:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610715402; cv=none; d=google.com; s=arc-20160816; b=THjJd9kAWPwgTTorl9xsrebwwseCt24nmxoF0pHY3svxTY4+Mc0g+mR28M7T/LtQ2p vSkm3AorObgYvBj+UZppF3ejhkvoulIUUAoYbshVB48CMyo6a98CrkNbXqZ929ByGjuH giezN4gamceXRi6h9ZUe0ivz+S1wYo8PMGhd9xM+t2W/oMdU2aiRJ5TlQWtRz/AA7Dsp oqurtpHwiSLk44X5xGVpi4xd2wLXWY0UNh4nzokNwFxUR4ieiv0bPwyA5W42IyC1O/Ur JP+SZPXdRjXTez8Jeos8c6NdU2+OnrM/i+IKNGTh3PQiIF445fFsurTmSJg8VGDCu1Wj JQoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KyqqGVWzjz3xy4p7VIf5U5JRarV5lW59QGjWuhePJq8=; b=VvgkppOM+mLaU2lzMQrCJqpuIwL1h3q2774mEYpqCz1oR0wsRyIvTukRkCL7GvXlyn WZ2k5HzscYOMXEV4kKUx7GbBQ41pEJQIoxINq8J76NwiceW2oDoRUKhwCLZR5gjf0AMm /MAVUjJqBw5Ot4AK/JscmFHyTvk6/HwvBBLy6xuAQdocMw1vd88IXAK12ltNoo/n4Or0 4PblEYDfHbnbKancBiM+DzHXTe670sIoK5luyyTZ7rpWg9drApzBks1l9M/do+h+hhoD ZKQNYp8kMTeWxYq4jUJgBTHufpkBOqChmTSwXWiBgM4iQAQ7XK5KURQn9IIabTF+sdxW wb0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=me35RYdH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u19si2063894edo.333.2021.01.15.04.56.19; Fri, 15 Jan 2021 04:56:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=me35RYdH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733015AbhAOMxr (ORCPT + 99 others); Fri, 15 Jan 2021 07:53:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:42884 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387736AbhAOMfn (ORCPT ); Fri, 15 Jan 2021 07:35:43 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id BED6D2371F; Fri, 15 Jan 2021 12:35:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610714103; bh=l5VtkXtMu9krPHv6MBjrU/BJhCHUV69z+qQ4LPpChyE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=me35RYdH/Ncg0jl0OP3e3+oetykIkdkdhhTd6EdTj36JHnShJ+sb2Ox/QKbAoFugP +CpJ+1R9CpwtT/xubUTVbTdZ1Q/BbjiNNK8/SS69x88HR2BEyWIJS+ROGdc5pgF5s7 tSsIbx6qYFPPX7+aYg96uVaALQ6X5KkbWqJVQX9M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Julian Wiedmann , Jakub Kicinski Subject: [PATCH 5.4 17/62] s390/qeth: fix L2 header access in qeth_l3_osa_features_check() Date: Fri, 15 Jan 2021 13:27:39 +0100 Message-Id: <20210115121959.239459241@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210115121958.391610178@linuxfoundation.org> References: <20210115121958.391610178@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Julian Wiedmann [ 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 Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/s390/net/qeth_l3_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c @@ -2114,7 +2114,7 @@ static netdev_features_t qeth_l3_osa_fea struct net_device *dev, netdev_features_t features) { - if (qeth_get_ip_version(skb) != 4) + if (vlan_get_protocol(skb) != htons(ETH_P_IP)) features &= ~NETIF_F_HW_VLAN_CTAG_TX; return qeth_features_check(skb, dev, features); }