Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261690AbUCaCgf (ORCPT ); Tue, 30 Mar 2004 21:36:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261704AbUCaCgf (ORCPT ); Tue, 30 Mar 2004 21:36:35 -0500 Received: from ozlabs.org ([203.10.76.45]:16105 "EHLO ozlabs.org") by vger.kernel.org with ESMTP id S261690AbUCaCgd (ORCPT ); Tue, 30 Mar 2004 21:36:33 -0500 Subject: Re: route cache DoS testing and softirqs From: Rusty Russell To: Srivatsa Vaddagiri Cc: Andrea Arcangeli , Dipankar Sarma , lkml - Kernel Mailing List , netdev@oss.sgi.com, Robert Olsson , "Paul E. McKenney" , Dave Miller , Alexey Kuznetsov , Andrew Morton , rusty@au1.ibm.com In-Reply-To: <20040330050614.GA4669@in.ibm.com> References: <20040329184550.GA4540@in.ibm.com> <20040329222926.GF3808@dualathlon.random> <20040330050614.GA4669@in.ibm.com> Content-Type: text/plain Message-Id: <1080700584.17686.237.camel@bach> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 31 Mar 2004 12:36:25 +1000 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1294 Lines: 27 On Tue, 2004-03-30 at 15:06, Srivatsa Vaddagiri wrote: > On Tue, Mar 30, 2004 at 01:07:12AM +0000, Andrea Arcangeli wrote: > > btw, the set_current_state(TASK_INTERRUPTIBLE) before > > kthread_should_stop seems overkill w.r.t. smp locking, plus the code is > > written in the wrong way around, all set_current_state are in the wrong > > place. It's harmless but I cleaned up that bit as well. > > I think set_current_state(TASK_INTERRUPTIBLE) before kthread_should_stop() > _is_ required, otherwise kthread_stop can fail to destroy a kthread. The problem is that kthread_stop used to send a signal to the kthread, which meant we didn't have to beware of races (since it would never sleep any more): kthread_should_stop() was called signal_pending 8) Andrew hated the signal mechanism, so I abandoned it, but didn't go back and fix all the users. It's tempting to send a signal anyway to make life simpler, though, although that might set a bad example for others. Rusty. -- Anyone who quotes me in their signature is an idiot -- Rusty Russell - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/