netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Zdenek Kabelac <zdenek.kabelac@gmail.com>
Cc: Patrick McHardy <kaber@trash.net>,
	Christoph Lameter <cl@linux-foundation.org>,
	Robin Holt <holt@sgi.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	Jesper Dangaard Brouer <hawk@comx.dk>,
	Linux Netdev List <netdev@vger.kernel.org>,
	Netfilter Developers <netfilter-devel@vger.kernel.org>
Subject: Re: System freeze on reboot - general protection fault
Date: Thu, 03 Sep 2009 00:17:43 +0200	[thread overview]
Message-ID: <4A9EEF07.5070800@gmail.com> (raw)
In-Reply-To: <c4e36d110909021445l5f44183es9e338437dfbbd195@mail.gmail.com>

Zdenek Kabelac a écrit :
> 2009/8/17 Patrick McHardy <kaber@trash.net>:
>> Eric Dumazet wrote:
>>> Zdenek Kabelac a écrit :
>>>>  [<ffffffffa02c502f>] nf_conntrack_ftp_fini+0x2f/0x70 [nf_conntrack_ftp]
>>>>  [<ffffffff8027bcc5>] sys_delete_module+0x1a5/0x270
>>>>  [<ffffffff8020d329>] ? retint_swapgs+0xe/0x13
>>>>  [<ffffffff80271bf2>] ? trace_hardirqs_on_caller+0x162/0x1b0
>>>>  [<ffffffff80292121>] ? audit_syscall_entry+0x191/0x1c0
>>>>  [<ffffffff80526dae>] ? trace_hardirqs_on_thunk+0x3a/0x3f
>>>>  [<ffffffff8020c84b>] system_call_fastpath+0x16/0x1b
>>>> Code: c6 00 00 0f 82 66 ff ff ff 49 8b 9e d8 05 00 00 48 85 db 75 16
>>>> e9 8e 00 00 00 0f 1f 44 00 00 48 85 c0 0f 84 80 00 00 00 48 89 c3 <0f>
>>>> b6 4b 37 48 8b 03 48 8d 14 cd 00 00 00 00 0f 18 08 48 29 ca
>>>> RIP  [<ffffffffa02b2c2c>] nf_conntrack_helper_unregister+0x16c/0x320
>>>> [nf_conntrack]
>>>>  RSP <ffff88013982fe68>
>>>> CR2: 0000000000000038
>>>> ---[ end trace bc3a0ede3d0084db ]---
>>>>
>>> I am currently traveling and wont be able to help you before next week.
>>>
>>> I added netdev, Patrick, and netfilter-devel in CC so that more eyes can take a look.
>> Thanks for the report, I'll have a look at this. Zdenek, please
>> send me the nf_conntrack.ko file used in the above oops. Thanks.
>>
> 
> Ok
> 
> I've found the solution for my problem.
> 
> http://thread.gmane.org/gmane.comp.security.firewalls.netfilter.devel/30483
> 
> I've made this small fix from this thread:
> 
> diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core
> index b5869b9..68488f8 100644
> --- a/net/netfilter/nf_conntrack_core.c
> +++ b/net/netfilter/nf_conntrack_core.c
> @@ -1108,6 +1108,7 @@ static void nf_conntrack_cleanup_init_net(void)
>  {
>         nf_conntrack_helper_fini();
>         nf_conntrack_proto_fini();
> +       rcu_barrier();
>         kmem_cache_destroy(nf_conntrack_cachep);
>  }
> 
> @@ -1266,7 +1267,7 @@ static int nf_conntrack_init_init_net(void)
> 
>         nf_conntrack_cachep = kmem_cache_create("nf_conntrack",
>                                                 sizeof(struct nf_conn),
> -                                               0, SLAB_DESTROY_BY_RCU, NULL);
> +                                               0, 0, NULL);
>         if (!nf_conntrack_cachep) {
>                 printk(KERN_ERR "Unable to create nf_conn slab cache\n");
>                 ret = -ENOMEM;
> 
> 
> As the thread nf_conntrack: Use rcu_barrier() and fix kmem_cache_create flags
> seems to be samewhat 'unfinished'  and already a bit old and I've no
> idea whether it actually fixes problem completely or just hides it in
> my case - I'm leaving it to some RCU gurus to fix this issue.
> 
> All I could say is - this this extra rcu_barrier() and removal of
> SLAB_DESTROY removes my GPF on reboot.
> 
> Zdenek

Ouch..

Dont think such a patch makes your kernel better, it'll crash too.

You cannot remove SLAB_DESTROY_BY_RCU like this, it's there for very good reasons.


  reply	other threads:[~2009-09-02 22:18 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <c4e36d110908110542l3de51aaepcbd62c84b9848f2b@mail.gmail.com>
     [not found] ` <alpine.DEB.1.10.0908111032110.30494@gentwo.org>
     [not found]   ` <c4e36d110908110752x253e30epb00cc71f4683052b@mail.gmail.com>
     [not found]     ` <alpine.DEB.1.10.0908111056550.30494@gentwo.org>
     [not found]       ` <c4e36d110908110832y21fba830ub8804613df571228@mail.gmail.com>
     [not found]         ` <20090811154853.GF2763@sgi.com>
     [not found]           ` <c4e36d110908111410y29b922ceod6871fda2514f6e6@mail.gmail.com>
     [not found]             ` <c4e36d110908121516u504809e9y537e9babfa95df1d@mail.gmail.com>
     [not found]               ` <alpine.DEB.1.10.0908121820410.3257@gentwo.org>
     [not found]                 ` <c4e36d110908131009l78b29bffvb4d41b90f9b83288@mail.gmail.com>
     [not found]                   ` <c4e36d110908140233v59421ba6y82192b858210370d@mail.gmail.com>
2009-08-16  9:16                     ` System freeze on reboot - general protection fault Eric Dumazet
2009-08-17 14:03                       ` Patrick McHardy
2009-09-02 21:45                         ` Zdenek Kabelac
2009-09-02 22:17                           ` Eric Dumazet [this message]
2009-09-02 22:31                             ` Zdenek Kabelac
2009-09-03  1:04                               ` [PATCH] slub: fix slab_pad_check() and SLAB_DESTROY_BY_RCU Eric Dumazet
2009-09-03  6:31                                 ` Pekka Enberg
2009-09-03  7:38                                   ` Eric Dumazet
2009-09-03  7:51                                     ` Pekka Enberg
2009-09-03 17:50                                       ` Christoph Lameter
2009-09-03 14:05                                         ` Pekka Enberg
2009-09-03 14:18                                           ` [PATCH] slub: Fix kmem_cache_destroy() with SLAB_DESTROY_BY_RCU Eric Dumazet
2009-09-03 19:48                                             ` Pekka Enberg
2009-09-03 19:56                                               ` Eric Dumazet
2009-09-03 17:45                                     ` [PATCH] slub: fix slab_pad_check() and SLAB_DESTROY_BY_RCU Christoph Lameter
2009-09-03 14:08                                       ` [PATCH] slub: fix slab_pad_check() Eric Dumazet
2009-09-03 18:38                                         ` Christoph Lameter
2009-09-03 15:01                                           ` Paul E. McKenney
2009-09-03 15:02                                           ` Eric Dumazet
2009-09-03 19:24                                             ` Christoph Lameter
2009-09-03 17:44                                               ` Paul E. McKenney
2009-09-03 22:43                                                 ` Christoph Lameter
2009-09-03 22:03                                                   ` Paul E. McKenney
2009-09-04 15:33                                                     ` Christoph Lameter
2009-09-03 22:08                                                   ` Eric Dumazet
2009-09-03 22:17                                                     ` Eric Dumazet
2009-09-04 15:39                                                       ` Christoph Lameter
2009-09-04 20:42                                                       ` Paul E. McKenney
2009-09-04 15:38                                                     ` Christoph Lameter
2009-09-03 17:59                                               ` Eric Dumazet
2009-09-03 19:00                                                 ` Pekka Enberg
2009-09-03 22:44                                                 ` Christoph Lameter
2009-09-03 23:17                                                   ` Paul E. McKenney
2009-09-04 15:42                                                     ` Christoph Lameter
2009-09-04 20:43                                                       ` Paul E. McKenney
2009-09-08 19:57                                                         ` Christoph Lameter
2009-09-08 22:20                                                           ` Paul E. McKenney
2009-09-08 22:41                                                             ` Christoph Lameter
2009-09-08 22:59                                                               ` Paul E. McKenney
2009-09-09 14:04                                                                 ` Christoph Lameter
2009-09-09 14:42                                                                   ` Paul E. McKenney
2009-09-09 14:53                                                                     ` Christoph Lameter
2009-09-09 15:09                                                                       ` Paul E. McKenney
2009-09-03 19:34                                         ` Pekka Enberg
2009-09-03 15:00                                       ` [PATCH] slub: fix slab_pad_check() and SLAB_DESTROY_BY_RCU Paul E. McKenney
2009-09-03 13:42                                   ` Paul E. McKenney
2009-09-03 13:28                                 ` Zdenek Kabelac
2009-09-03 13:46                                   ` Eric Dumazet
2009-09-03 14:35                                     ` Zdenek Kabelac
2009-09-03 18:17                             ` System freeze on reboot - general protection fault Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A9EEF07.5070800@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=cl@linux-foundation.org \
    --cc=hawk@comx.dk \
    --cc=holt@sgi.com \
    --cc=kaber@trash.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=zdenek.kabelac@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).