Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 1 Mar 2003 00:22:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 1 Mar 2003 00:22:58 -0500 Received: from packet.digeo.com ([12.110.80.53]:25528 "EHLO packet.digeo.com") by vger.kernel.org with ESMTP id ; Sat, 1 Mar 2003 00:22:57 -0500 Date: Fri, 28 Feb 2003 21:33:20 -0800 From: Andrew Morton To: Dawson Engler Cc: linux-kernel@vger.kernel.org, mc@cs.stanford.edu Subject: Re: [CHECKER] a few race conditions Message-Id: <20030228213320.6d2da213.akpm@digeo.com> In-Reply-To: <200303010455.h214tpO11048@csl.stanford.edu> References: <200303010455.h214tpO11048@csl.stanford.edu> X-Mailer: Sylpheed version 0.8.9 (GTK+ 1.2.10; i586-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 01 Mar 2003 05:33:13.0271 (UTC) FILETIME=[0D758C70:01C2DFB4] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1021 Lines: 22 Dawson Engler wrote: > > BUG FALSE pair: lock=, var= > 2 errors out of 5 uses: > /u2/engler/mc/oses/linux/linux-2.5.53/fs/dcache.c:284:d_prune_aliases: ERROR: var not protected by (pop=5, s=3) [locked=0] > > i think this actually is a race: other places check it. > > void d_prune_aliases(struct inode *inode) > { > struct list_head *tmp, *head = &inode->i_dentry; > restart: > spin_lock(&dcache_lock); This is OK. Local variable `head' is being set up to point at a member inside the inode, but we're not dereferencing that pointer outside the lock. The address of inode->i_dentry is constant across this function. - 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/