From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] net: ena: fix race condition between device reset and link up setup Date: Sun, 19 Nov 2017 12:40:10 +0900 (KST) Message-ID: <20171119.124010.1303273954049036187.davem@davemloft.net> References: <1510974336-105124-1-git-send-email-netanel@amazon.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, dwmw@amazon.com, zorik@amazon.com, matua@amazon.com, saeedb@amazon.com, msw@amazon.com, aliguori@amazon.com, nafea@amazon.com, evgenys@amazon.com To: netanel@amazon.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:49540 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751068AbdKSDkP (ORCPT ); Sat, 18 Nov 2017 22:40:15 -0500 In-Reply-To: <1510974336-105124-1-git-send-email-netanel@amazon.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Date: Sat, 18 Nov 2017 03:05:36 +0000 > From: Netanel Belgazal > > In rare cases, ena driver would reset and re-start the device, > for example, in case of misbehaving application that causes > transmit timeout > > The first step in the reset procedure is to stop the Tx traffic by > calling ena_carrier_off(). > > After the driver have just started the device reset procedure, device > happens to send an asynchronous notification (via AENQ) to the driver > than there was a link change (to link-up state). > This link change is mapped to a call to netif_carrier_on() which > re-activates the Tx queues, violating the assumption of no tx traffic > until device reset is completed, as the reset task might still be in > the process of queues initialization, leading to an access to > uninitialized memory. This patch lacks a proper Signed-off-by: tag. Please resubmit with this corrected. Thank you.