From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751145AbdGNXMm (ORCPT ); Fri, 14 Jul 2017 19:12:42 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:33929 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750917AbdGNXMk (ORCPT ); Fri, 14 Jul 2017 19:12:40 -0400 From: Doug Berger To: netdev@vger.kernel.org Cc: Florian Fainelli , linux-kernel@vger.kernel.org, Doug Berger Subject: [PATCH net 0/2] Fragmented SKB corrections Date: Fri, 14 Jul 2017 16:12:08 -0700 Message-Id: <20170714231210.12967-1-opendmb@gmail.com> X-Mailer: git-send-email 2.13.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Two issues were observed in a review of the bcmgenet driver support for fragmented SKBs which are addressed by this patch set. The first addresses a problem that could occur if the driver is not able to DMA map a fragment of the SKB. This would be a highly unusual event but it would leave the hardware descriptors in an invalid state which should be prevented. The second is a hazard that could occur if the driver is able to reclaim the first control block of a fragmented SKB before all of its fragments have completed processing by the hardware. In this case the SKB could be freed leading to reuse of memory that is still in use by hardware. Doug Berger (2): net: bcmgenet: Fix unmapping of fragments in bcmgenet_xmit() net: bcmgenet: Free skb after last Tx frag drivers/net/ethernet/broadcom/genet/bcmgenet.c | 299 +++++++++++++------------ drivers/net/ethernet/broadcom/genet/bcmgenet.h | 2 + 2 files changed, 152 insertions(+), 149 deletions(-) -- 2.13.0