Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752387AbdLSS0e (ORCPT ); Tue, 19 Dec 2017 13:26:34 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:54614 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751478AbdLSS0b (ORCPT ); Tue, 19 Dec 2017 13:26:31 -0500 Date: Tue, 19 Dec 2017 13:26:30 -0500 (EST) Message-Id: <20171219.132630.1816700498837086028.davem@davemloft.net> To: al.kochet@gmail.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, f.fainelli@gmail.com, edumazet@google.com Subject: Re: [PATCH v2] net: arc_emac: fix arc_emac_rx() error paths From: David Miller In-Reply-To: <1513681624-32375-1-git-send-email-al.kochet@gmail.com> References: <1513358406-32503-1-git-send-email-al.kochet@gmail.com> <1513681624-32375-1-git-send-email-al.kochet@gmail.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 19 Dec 2017 10:26:31 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 496 Lines: 15 From: Alexander Kochetkov Date: Tue, 19 Dec 2017 14:07:04 +0300 > arc_emac_rx() has some issues found by code review. > > In case netdev_alloc_skb_ip_align() or dma_map_single() failure > rx fifo entry will not be returned to EMAC. > > In case dma_map_single() failure previously allocated skb became > lost to driver. At the same time address of newly allocated skb > will not be provided to EMAC. > > Signed-off-by: Alexander Kochetkov Applied.