Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933318AbdCUVqp (ORCPT ); Tue, 21 Mar 2017 17:46:45 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:57290 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933195AbdCUVqm (ORCPT ); Tue, 21 Mar 2017 17:46:42 -0400 Date: Tue, 21 Mar 2017 14:37:29 -0700 (PDT) Message-Id: <20170321.143729.15606239118290633.davem@davemloft.net> To: hayeswang@realtek.com Cc: netdev@vger.kernel.org, petr.vorel@gmail.com, nic_swsd@realtek.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH net] r8152: fix the list rx_done may be used without initialization From: David Miller In-Reply-To: <1394712342-15778-252-Taiwan-albertk@realtek.com> References: <20170313215714.n2p6j4nxtpxbheaj@dell5510> <1394712342-15778-252-Taiwan-albertk@realtek.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / 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, 21 Mar 2017 14:37:30 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 494 Lines: 15 From: Hayes Wang Date: Tue, 14 Mar 2017 14:15:20 +0800 > The list rx_done would be initialized when the linking on occurs. > Therefore, if a napi is scheduled without any linking on before, > the following kernel panic would happen. > > BUG: unable to handle kernel NULL pointer dereference at 000000000000008 > IP: [] r8152_poll+0xe1e/0x1210 [r8152] > PGD 0 > Oops: 0002 [#1] SMP > > Signed-off-by: Hayes Wang Applied.