Sometime back, Linus has pointed a race regading d_lookup and concurrent
d_move (rename). If lookup moves to a different bucket due to d_move, it may
fail the lookup. rename in the same directory is protected by parent's i_sem
but rename in some unrelated directory on the same hash chain can have
this problem. This can result in real_lookup allocating a new dentry for an
existing one.
Now, similar problem is there with lookup_hash()->cached_lookup(), where
lookup_hash() ends up in allocating a duplicate dentry.
Linus, actually fixed the race in real_lookup using dcache_lock around the
d_lookup call. The patch I posted replaces this with seqlock and also fixes
the cached_lookup() case.
Regards,
Maneesh
-- Maneesh Soni IBM Linux Technology Center, IBM India Software Lab, Bangalore. Phone: +91-80-5044999 email: maneesh@in.ibm.com http://lse.sourceforge.net/ - 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/