Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4273397pxu; Mon, 12 Oct 2020 14:31:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHivkUJ+6SLM6I5y8m43cqyi3rTDOGv4XGXOg9DoxYCqdSim9Cz96V5Z7Z9cghCvhx3vgm X-Received: by 2002:a05:6402:551:: with SMTP id i17mr16229802edx.384.1602538279752; Mon, 12 Oct 2020 14:31:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602538279; cv=none; d=google.com; s=arc-20160816; b=IppHMZ33S0VEAnk8/2pYLDAcJN+o1XJNz5qRzBNlmyO8M6u/2FBwZvd+q/6qYTdOrX 91ZN3ZxW3kEPfDsM2yhY7dm+nfTsREkLBIcD8fOC37HITwfgLZ4wNaVNo4B46K1qO28e J627L8dcpUd2j9OhWXtJMMO3OzaC5RPck9XpVZ8B+lXTDKyAHuG44zY8u8bYkLb59zgw D0thF8mryeO7MInkT9xI1S1VeFS7t1wPVY4OmtAuFDxAwL9o9vHK1vlAP2wFLT9n8Wtp T0AXuhl5gohHLfC0K+RgU/RiX4DTqbJ9zAmF9GW55+C1KjQKcVDZi54Xk+vnoV8+55qo l2Cw== 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=NHckiMG5v9c80outuHBGLP1bmgoYK7UvLpLPKwg4OCw=; b=nBViRS6UrwgOfklR/ps9T6836buO2KBxyJkNtR5YKiOrDzw8MTB+r2eISV03O0f29D P62iO8q5jaa4xuoUkkineZekgkkMVy/7Am714wkZdKDPCPmY3zidShK6jqHJG5VSIcYx 2LPSQTouZbvTwwQcDzN+E243yN5MUP9AB/bZ/OjaSGP4/f5IHZdcd2E0wJyNtgqbPVVr 9JHwzp+ukcbQQA0qt43y4KafgHRDW6qrYnRm20s9B1Tkbb5StLucN26FVNo5v28KUOXC OsO6+uMRCizVDxhGWC6HmCUEleR48Yz6yq8/k3UQWlq5ojw8nn7MyNpzRwddjelaRxAo kHZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="g/e9+24f"; 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 z14si12815051edr.215.2020.10.12.14.30.57; Mon, 12 Oct 2020 14:31:19 -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="g/e9+24f"; 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 S2388911AbgJLNkk (ORCPT + 99 others); Mon, 12 Oct 2020 09:40:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:42852 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731331AbgJLNjI (ORCPT ); Mon, 12 Oct 2020 09:39:08 -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 908992076E; Mon, 12 Oct 2020 13:39:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602509948; bh=rS/DKVSXYHaqG/sx+63VH2DsCVYVXiUBflgXOxQzpvQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g/e9+24fHkT7VIZgDrhRVilohcFWN4jgsWriGu+qtp/ixx12LZAbBxSKxUR2JMcOO +8cD1PCDCMnbFXlc2z+fe/tKv8K8hmntjvA6Aw7hiqn6Ae4LT6zh+X+TA1s1+0kzNc AUXTriGvrBOfGwYL18Z+yjVJXVlKnk5tdOhJPe/0= 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.19 26/49] team: set dev->needed_headroom in team_setup_by_port() Date: Mon, 12 Oct 2020 15:27:12 +0200 Message-Id: <20201012132630.666443258@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201012132629.469542486@linuxfoundation.org> References: <20201012132629.469542486@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 @@ -2086,6 +2086,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);