From patchwork Wed Sep 5 16:12:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 181894 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 0C2972C0086 for ; Thu, 6 Sep 2012 02:13:00 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752725Ab2IEQM6 (ORCPT ); Wed, 5 Sep 2012 12:12:58 -0400 Received: from mail-bk0-f46.google.com ([209.85.214.46]:62589 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752001Ab2IEQM5 (ORCPT ); Wed, 5 Sep 2012 12:12:57 -0400 Received: by bkwj10 with SMTP id j10so352682bkw.19 for ; Wed, 05 Sep 2012 09:12:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; bh=QAg4WIaz1ESjXzeuFxsgnocmPy+hPOJsiS2YjjNkkBk=; b=TXhxp99v0vrEatCpv9ErSYc5VUFlgSzg0/yt1CaL5jofpYGqY5ttYtb7J9RdS9iUAg HBxJL1QEo9ibfrg7OX6qZlEgDeeIKNikUtPuQEPwliT6E7I/Jh8gyLTbIyL3/abyZXvG KgUuHHNbPAxAzpJpFHaAbyb0LZFT1kxzxCd59bL5koORKHslM54BGvHMPSFQ9Bq6+4O0 Q0K4GoB5hzGjF2CoaYD0Es/O8VvG6tO+4OpvK6MLvU60mtwud9YBSj2B20Cp8c6v3u6m 6h6eYv7JpurKrkBNL/xUTcdVgD6xdWY+ZAZOI0VS9+9rlki/CwfvSy4c1ae7QK98Rjft kSPQ== Received: by 10.204.155.69 with SMTP id r5mr9573639bkw.49.1346861575829; Wed, 05 Sep 2012 09:12:55 -0700 (PDT) Received: from [192.168.162.31] ([74.125.121.33]) by mx.google.com with ESMTPS id n17sm1600753bks.6.2012.09.05.09.12.52 (version=SSLv3 cipher=OTHER); Wed, 05 Sep 2012 09:12:54 -0700 (PDT) Subject: Re: NULL pointer dereference in xt_register_target() From: Eric Dumazet To: Cong Wang Cc: netfilter-devel@vger.kernel.org, Linux Kernel Network Developers In-Reply-To: <1346860506.13121.148.camel@edumazet-glaptop> References: <1346860506.13121.148.camel@edumazet-glaptop> Date: Wed, 05 Sep 2012 18:12:49 +0200 Message-ID: <1346861569.13121.149.camel@edumazet-glaptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org On Wed, 2012-09-05 at 17:55 +0200, Eric Dumazet wrote: > On Wed, 2012-09-05 at 23:43 +0800, Cong Wang wrote: > > Hi, folks, > > > > The latest net-next tree can't boot due to a NULL ptr def > > bug in the kernel, the full backtrack is: > > > > http://img1.douban.com/view/photo/photo/public/p1697139550.jpg > > > > the kernel .config file is: > > > > http://pastebin.com/9YTnkqKN > > > > I don't have time to look into the issue. If you need other info, > > please let me know. > > It seems xt_nat_init() is called before xt_init(), so xt array is not > yet setup. > > Seems the following patch should help, I have to try it ;) --- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 8d987c3..afcea11 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -1390,6 +1390,6 @@ static void __exit xt_fini(void) kfree(xt); } -module_init(xt_init); +core_initcall(xt_init); module_exit(xt_fini);