Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 25 Feb 2001 19:34:05 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 25 Feb 2001 19:33:55 -0500 Received: from ns.virtualhost.dk ([195.184.98.160]:18190 "EHLO virtualhost.dk") by vger.kernel.org with ESMTP id ; Sun, 25 Feb 2001 19:33:48 -0500 Date: Mon, 26 Feb 2001 01:33:26 +0100 From: Jens Axboe To: Alexander Viro Cc: Nate Eldredge , linux-kernel@vger.kernel.org Subject: Re: 2.4.2-ac3: loop threads in D state Message-ID: <20010226013326.X7830@suse.de> In-Reply-To: <20010226012430.V7830@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ; from viro@math.psu.edu on Sun, Feb 25, 2001 at 07:29:21PM -0500 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 25 2001, Alexander Viro wrote: > Erm... Jens, it really should be > if (atomic_dec_and_test(...)) > up(...); > not just > atomic_dec(...); > up(...); > > Otherwise you can end up with too early exit of loop_thread. Normally > it would not matter, but in pathological cases... How so? We dec it and up the semaphore, loop_thread runs until it's done and ups lo_sem. -- Jens Axboe - 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/