Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4002697pxu; Mon, 12 Oct 2020 07:07:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfMYz8pRJbZ1waLDle9zYH2yb50ctEqY6w19qbGj14v0MqJGlXUzj+MABfkYhvoXDrzW5E X-Received: by 2002:aa7:c7d7:: with SMTP id o23mr14205993eds.44.1602511622764; Mon, 12 Oct 2020 07:07:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602511622; cv=none; d=google.com; s=arc-20160816; b=t/MNwEyKyrRyB7hc3xDqPCb2c1uM8VfIyWnAQLTQFqAhb9DAISqlHRWtVDiyKChv2y azYbNJ7v0O48pJYVemROJEn3WevBF6TkpPiAOpUvg+PUVDsL5hSvTD4mPhQ57ti+1CxT NkcOhUycHPU0JK7JwAe15XJRrCn9kAJ/1OOLvipjrnP14PTfnqABxIdGgJL4SrKWimZP A0FrRVlYv8Lg2DFWN6pcaJOWsopmrxwacwN+n4LSsyCp2bcv1EB/KmCvswqdbLsVCD8M 2wsjfK28ifWh98SJIGiU/xQr/BQgj7o4Lc6zYgB2Kc7PTe0X8xEp6NEeeacpvPdjhRwS ti5w== 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=XG9UvyM3QHDzapvp4nyJy63GVfvayHOXIO/dGFwEsJU=; b=OUsrtSFI6cbpF0GYGp2lijzLzeUqe/Xz+t8szbBq4eZPp41J6eM118o+Q6afM5eTAi LzKjnXfcq9ygnz1yl1U2AY0IWfAjDcueGxeuD1cGiSRw0qqFnaoqsNbZhkHLYlN8TXB5 iVbdP9mIGs+uImKIZEW3qwRWIKbdl0CSFnPjopEyZ8N5Kmt9vDbhG7ERKxR2HF0VUh6x v8s2J3epD5bX4IY8qpZDtbKE5eYfm8k7h43Ji8lfWoMzi5G/GwZH4t8+QlaMialhSjQY /OQkNAobRF5TRAbGBpP+me4qOjrVh4m7hfpxIiUfTWuxQtQA9bT5ogt6SmSTMDw0UkHP q3tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Q3q0BArR; 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=fail (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 rv25si7001630ejb.102.2020.10.12.07.06.36; Mon, 12 Oct 2020 07:07:02 -0700 (PDT) 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=@kernel.org header.s=default header.b=Q3q0BArR; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730990AbgJLOCa (ORCPT + 99 others); Mon, 12 Oct 2020 10:02:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:40198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730996AbgJLNiB (ORCPT ); Mon, 12 Oct 2020 09:38:01 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 02C1722248; Mon, 12 Oct 2020 13:37:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602509877; bh=FJ/Yu0c42TBbZfD2AqTNxWWXO78WOgIn4l+PORxlgcY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q3q0BArRkqKyQpbYHBbKuywAcRAr5FaQMtU7mvwM7HOTm/Qd9we42qVORwdov8wv2 wKzwua7uJH2qfdOCuLheiuJsVflVOaHZ55OUohxqVuiymBMYqlsTLcr/zVAaGcBIwO y9QRv3Rxt29K4KMZV/exedRB+pUDbSXeF6gRjqcs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , "David S. Miller" Subject: [PATCH 4.14 50/70] team: set dev->needed_headroom in team_setup_by_port() Date: Mon, 12 Oct 2020 15:27:06 +0200 Message-Id: <20201012132632.595360285@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201012132630.201442517@linuxfoundation.org> References: <20201012132630.201442517@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: Eric Dumazet commit 89d01748b2354e210b5d4ea47bc25a42a1b42c82 upstream. Some devices set needed_headroom. If we ignore it, we might end up crashing in various skb_push() for example in ipgre_header() since some layers assume enough headroom has been reserved. Fixes: 1d76efe1577b ("team: add support for non-ethernet devices") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/team/team.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c @@ -2078,6 +2078,7 @@ static void team_setup_by_port(struct ne dev->header_ops = port_dev->header_ops; dev->type = port_dev->type; dev->hard_header_len = port_dev->hard_header_len; + dev->needed_headroom = port_dev->needed_headroom; dev->addr_len = port_dev->addr_len; dev->mtu = port_dev->mtu; memcpy(dev->broadcast, port_dev->broadcast, port_dev->addr_len);