From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manfred Spraul Subject: Re: [PATCH] qdisc oops fix Date: Wed, 16 Apr 2003 17:23:06 +0200 Sender: netdev-bounce@oss.sgi.com Message-ID: <3E9D755A.8060601@colorfullife.com> References: <20030415084706.O1131@shell.cyberus.ca> <20030416072952.E4013@shell.cyberus.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Catalin BOIE , Tomas Szepe , linux-kernel@vger.kernel.org, netdev@oss.sgi.com, kuznet@ms2.inr.ac.ru Return-path: To: jamal In-Reply-To: <20030416072952.E4013@shell.cyberus.ca> Errors-to: netdev-bounce@oss.sgi.com List-Id: netdev.vger.kernel.org jamal wrote: >This is a different problem from previous one posted. > >Theres a small window (exposed given that you are provisioning a lot >of qdiscs and running traffic at the same time) that an incoming packet >interupt will cause the BUG(). > >GFP_ATOMIC will fix it, but i wonder if it appropriate. > > This is a 2.4 kernel, correct? >>With many rules (~5000 classes and ~3500 qdiscs and ~50000 filters) >>the kernel oopses in slab.c:1128. >> This check? if (in_interrupt() && (flags & SLAB_LEVEL_MASK) != SLAB_ATOMIC) BUG(); It's triggered, because someone does something like spin_lock_bh(&my_lock); p = kmalloc(,GFP_KERNEL); I don't like the proposed fix: usually code that calls kmalloc(,GFP_KERNEL) assumes that it runs at process space, e.g. uses semaphores, or non-bh spinlocks, etc. slab just happens to contain a test that complains about illegal calls. >>Trace; c0127e0f >>Trace; c01d3cac >>Trace; d081ecc7 >>Trace; c01d5265 >>Trace; d0820600 >>Trace; c01d27e4 >>Trace; c01d0605 <__neigh_event_send+89/1b4> >>Trace; c01d7cd4 >>Trace; c01d7730 >>Trace; c01d7b73 >>Trace; c01c79d5 >>Trace; c01c8b48 >>Trace; c0120010 >> >> >> >> I don't understand the backtrace. Were any modules loaded? Perhaps 0xd081ecc7 is a module. I'd add a if(in_interrupt()) show_stack(NULL); into qdisc_create_dflt(), and try to reproduce the bug without modules. -- Manfred