Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2173553ybl; Sun, 18 Aug 2019 20:16:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyyiPox44jvn7yk8GI9im+qcF6X6vUIZvNs2oH1ZLWa0GH+GAH882jmmxGszI+2EnQ+BBVN X-Received: by 2002:a63:d90f:: with SMTP id r15mr17991341pgg.259.1566184611619; Sun, 18 Aug 2019 20:16:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566184611; cv=none; d=google.com; s=arc-20160816; b=tfg1Ty07bmIbAtLU3KOE8k5JrRvjrrUlufvYkrdqtdDm7Bn56UzkuIvomhOord3oHF FpVvsgteRAgswhgsnRZW4/0qLO/yDuQA83UCQ4EsP9QiL6vZa1aK7PkY9oAsC79cpSLV KEvbLEz3TltcEBIQvLUvkCwvSLOB8umJrGgPe3bE6ryQdgdXSYkuwP6Fw/eTlOqKQZY7 2SbA+asfKO2NoON+qqDDOj2ZY1qOjGUaGpSFd/rG0/BEANh6aIK7Nb1alfsvQryJckfi VeIo9vNmdHQkdeHRldMdl5DeEJydRIKbOicp1tmZvysRIUivGldq+n6szM0zDXqUHvYa 3OvA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :authenticated-by; bh=729sLnDMvn8pugzMncxPznM8HoFbamXUQaZzkzboyyU=; b=NtjC1AXw9Gg/LygIymSmFlj9OONi0h+qIVKmMkUWVcgZsZN6FmgdcvXDYg+zt0c9Qq Ek0SV4bumOL/zQYM5zUTjZFPti21VRKAJ38LsskTqgieL4f/KvKlqwzg0N1XLRSPqeur CPVNLsAhWf3dGopqeixUW0ie1p4yhTHAN2NRIxuf7t2wR+p8UYehrR3rxJaf0WSTv8k7 5x+eszaDxy3VROG1T5oQYCodsmjdvLG05NIWr3yN5yxBOjcFj5nVhdO9S5THaw7kM+vD Eh8rXVYkPXy/d5lURbLSayrAY/BLAahYdrPLe0s0UXbGW2T0MprzLpHhM1F22VEv1Oxz Ql7Q== ARC-Authentication-Results: i=1; mx.google.com; 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 e2si8840164pgf.256.2019.08.18.20.16.36; Sun, 18 Aug 2019 20:16:51 -0700 (PDT) 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; 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 S1726512AbfHSDPp (ORCPT + 99 others); Sun, 18 Aug 2019 23:15:45 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:38967 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726281AbfHSDPp (ORCPT ); Sun, 18 Aug 2019 23:15:45 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID x7J3Fhrd005516, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (RTITCASV02.realtek.com.tw[172.21.6.19]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id x7J3Fhrd005516 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 19 Aug 2019 11:15:43 +0800 Received: from fc30.localdomain (172.21.177.138) by RTITCASV02.realtek.com.tw (172.21.6.19) with Microsoft SMTP Server id 14.3.468.0; Mon, 19 Aug 2019 11:15:42 +0800 From: Hayes Wang To: CC: , , Hayes Wang Subject: [PATCH net-next] r8152: fix accessing skb after napi_gro_receive Date: Mon, 19 Aug 2019 11:15:19 +0800 Message-ID: <1394712342-15778-302-Taiwan-albertk@realtek.com> X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <1394712342-15778-299-albertk@realtek.com> References: <1394712342-15778-299-albertk@realtek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [172.21.177.138] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix accessing skb after napi_gro_receive which is caused by commit 47922fcde536 ("r8152: support skb_add_rx_frag"). Fixes: 47922fcde536 ("r8152: support skb_add_rx_frag") Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 40d18e866269..b1db6df6f4ab 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -2094,10 +2094,10 @@ static int rx_bottom(struct r8152 *tp, int budget) skb->protocol = eth_type_trans(skb, netdev); rtl_rx_vlan_tag(rx_desc, skb); if (work_done < budget) { - napi_gro_receive(napi, skb); work_done++; stats->rx_packets++; stats->rx_bytes += skb->len; + napi_gro_receive(napi, skb); } else { __skb_queue_tail(&tp->rx_queue, skb); } -- 2.21.0