From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] net: lan78xx: Fix race in tx pending skb size calculation Date: Mon, 16 Jul 2018 14:13:20 -0700 (PDT) Message-ID: <20180716.141320.1898046446934093342.davem@davemloft.net> References: <1531684400-15778-1-git-send-email-stefan.wahren@i2se.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: woojung.huh@microchip.com, UNGLinuxDriver@microchip.com, gregkh@linuxfoundation.org, dave.stevenson@raspberrypi.org, netdev@vger.kernel.org, linux-usb@vger.kernel.org, stable@vger.kernel.org, bos@je-eigen-domein.nl To: stefan.wahren@i2se.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:60310 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728359AbeGPVmd (ORCPT ); Mon, 16 Jul 2018 17:42:33 -0400 In-Reply-To: <1531684400-15778-1-git-send-email-stefan.wahren@i2se.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Stefan Wahren Date: Sun, 15 Jul 2018 21:53:20 +0200 > The skb size calculation in lan78xx_tx_bh is in race with the start_xmit, > which could lead to rare kernel oopses. So protect the whole skb walk with > a spin lock. As a benefit we can unlink the skb directly. > > This patch was tested on Raspberry Pi 3B+ > > Link: https://github.com/raspberrypi/linux/issues/2608 > Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet") > Cc: stable > Signed-off-by: Floris Bos > Signed-off-by: Stefan Wahren Applied and queued up for -stable, thanks.