Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932171AbYBGQSa (ORCPT ); Thu, 7 Feb 2008 11:18:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757997AbYBGQSP (ORCPT ); Thu, 7 Feb 2008 11:18:15 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:59109 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1757541AbYBGQSN (ORCPT ); Thu, 7 Feb 2008 11:18:13 -0500 Date: Thu, 7 Feb 2008 11:18:12 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Pavel Emelyanov cc: Duncan Sands , , Linux Kernel Mailing List Subject: Re: [PATCH][USBATM]: convert heavy init dances to kthread API In-Reply-To: <47AACE2B.2040404@openvz.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 648 Lines: 17 On Thu, 7 Feb 2008, Pavel Emelyanov wrote: > > Does the kthread API guarantee that the kthread is not running until you call > > It does. That's why the race, you mentioned above is impossible. That is wrong. The API guarantees only that the kthread is initially created in a non-running state. It cannot guarantee that no other task will wake up the kthread before the caller does. Alan Stern -- 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/