Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5991198ybc; Wed, 27 Nov 2019 13:02:20 -0800 (PST) X-Google-Smtp-Source: APXvYqyTd7araVLWHRZoQ4HRMXUIsmA2vQ4F1zaUfE9EsXnZHisbvDfa9MnRu8fa3fhx4AKIA0QG X-Received: by 2002:a05:6402:547:: with SMTP id i7mr35834552edx.55.1574888539985; Wed, 27 Nov 2019 13:02:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888539; cv=none; d=google.com; s=arc-20160816; b=Bjuhi0cZSxhNZxjH/vn0/4YZ7ru7ZTyjv++tT5JwrHwaMKc/GQ467Y/bIXldl4+GdO aQlNxgP/rwRj4wyI5hdQusTvkPbqsbfyRlJk166cl25fjatabxGAS1U9DmOYmWcWj866 ia7AxA6TjHg2ykYcbkA/Gjvn93wyDkkBMR1fCvIjuJL3HfBt1qFw4Xs0i2DL1WUBBbpC AUQF7ThbcOukc0X91qz0Q/50cCX1uC9k2LXl4ByPku+65jsPE2d6GjzDJ7Sw3QqeY/Rf z5Tk63t3kuhhkHD+N5gnHfezA2zo4MY0VjrFgWKP4qozr42sL8AI/WedpVJB0WYXSzLL QVXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ninuTLFME3IPveQ/mB/kI2xl/aVwO7j7MkOAth30VVk=; b=kGIbJUDXWdOwTqeCLsO/fZVYo9DeSCS/ZqeNtpzgqvtqIfeY+yzVDDXkf6JBEYglt6 /1BmilokvDn4enGMCm4rxtPNw39QmVhSzopMIF9K9X9rrlnkG8gQIdTNygX9C21MxWQW 2R8Z+Y03DJ1aE0ZDCtGQ89COU4C+DV0mdXYaY4blEgj1ScJwxl/ND2mcotlZPpSQoCQ6 yCZyYUVYlTIZ3msChZlTMLL6DO2fn788ezvwf9HKZXwc9Q9zDScwLXcmJjQfdLGO+Uv7 ssqEfkK2fhZv+lEnnZnmpPMwhYPfNwLWhcuAlKQhsi9PKj+wcYwPrvwlMk2ZIDCu/KZw HImw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="R/VMtjrt"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l23si12788439edc.279.2019.11.27.13.01.56; Wed, 27 Nov 2019 13:02:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="R/VMtjrt"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731260AbfK0VBE (ORCPT + 99 others); Wed, 27 Nov 2019 16:01:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:53100 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731653AbfK0VBC (ORCPT ); Wed, 27 Nov 2019 16:01:02 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 EC0932086A; Wed, 27 Nov 2019 21:01:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888461; bh=hiiQw4GIooAvk2r6v2UyMwi5UDbrlJKGpCYFPYlAAqM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R/VMtjrtEJqY5jFfpZtYMo3ATyi6eIBHOO8FJgZGAekzpN112BrxnpL22xMz30imX NzNrcJpOqqqZwDXyLrv61My4EUt62KxR3kmPKvEUmq3L9vAEkUaNd2T/CHy0yQTkux 95WmDW0jyY7krPwTk4nYqy6sn3Ki1xbPskCCo37U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tristram Ha , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 141/306] net: ethernet: cadence: fix socket buffer corruption problem Date: Wed, 27 Nov 2019 21:29:51 +0100 Message-Id: <20191127203125.628204748@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tristram Ha [ Upstream commit 899ecaedd15599c22553d158f53b127cc1632dc2 ] Socket buffer is not re-created when headroom is 2 and tailroom is 1. Signed-off-by: Tristram Ha Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/cadence/macb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 74eeb3a985bf1..f175b20ac510a 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -1721,7 +1721,7 @@ static int macb_pad_and_fcs(struct sk_buff **skb, struct net_device *ndev) padlen = 0; /* No room for FCS, need to reallocate skb. */ else - padlen = ETH_FCS_LEN - tailroom; + padlen = ETH_FCS_LEN; } else { /* Add room for FCS. */ padlen += ETH_FCS_LEN; -- 2.20.1