Re: [CHECKER] a few race conditions

From: Andrew Morton (akpm@digeo.com)
Date: Sat Mar 01 2003 - 00:33:20 EST


Dawson Engler <engler@csl.stanford.edu> wrote:
>
> BUG FALSE pair: lock=<dcache_lock:spinlock_t:0>, var=<struct inode.i_dentry>
> 2 errors out of 5 uses:
> /u2/engler/mc/oses/linux/linux-2.5.53/fs/dcache.c:284:d_prune_aliases: ERROR: var <struct inode.i_dentry> not protected by <dcache_lock:spinlock_t:0>(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/



This archive was generated by hypermail 2b29 : Fri Mar 07 2003 - 22:00:15 EST