Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262483AbTESOPf (ORCPT ); Mon, 19 May 2003 10:15:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262486AbTESOPf (ORCPT ); Mon, 19 May 2003 10:15:35 -0400 Received: from franka.aracnet.com ([216.99.193.44]:61350 "EHLO franka.aracnet.com") by vger.kernel.org with ESMTP id S262483AbTESOPe (ORCPT ); Mon, 19 May 2003 10:15:34 -0400 Date: Mon, 19 May 2003 07:28:22 -0700 From: "Martin J. Bligh" To: ptb@it.uc3m.es, William Lee Irwin III cc: linux-kernel@vger.kernel.org Subject: Re: recursive spinlocks. Shoot. Message-ID: <34270000.1053354500@[10.10.2.4]> In-Reply-To: <200305181724.h4IHOHU24241@oboe.it.uc3m.es> References: <200305181724.h4IHOHU24241@oboe.it.uc3m.es> X-Mailer: Mulberry/2.2.1 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 772 Lines: 20 > That's a problem looking for a solution! No, the reason for wanting a > recursive spinlock is that nonrecursive locks make programming harder. And more correct. > Though I've got quite good at finding and removing deadlocks in my old > age, there are still two popular ways that the rest of the world's > prgrammers often shoot themselves in the foot with a spinlock: > > a) sleeping while holding the spinlock > b) taking the spinlock in a subroutine while you already have it So ... we should BUG() on both. M. - 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/