Re: [PATCH 4/7] autofs4 - fix indirect mount pending expire race

From: Jeff Moyer
Date: Fri Jul 18 2008 - 15:14:42 EST


Ian Kent <raven@xxxxxxxxxx> writes:

> On Fri, 2008-07-18 at 14:52 -0400, Jeff Moyer wrote:
>> Ian Kent <raven@xxxxxxxxxx> writes:
>> > } else {
>> > + /* Path walk currently on this dentry? */
>> > + ino_count = atomic_read(&ino->count) + 1;
>> > + if (atomic_read(&dentry->d_count) > ino_count)
>> > + goto next;
>> > +
>> > expired = autofs4_check_leaves(mnt, dentry, timeout, do_now);
>> > if (expired) {
>> > dput(dentry);
>
> The expired dentry may be a different dentry!
>
>> > found:
>> > DPRINTK("returning %p %.*s",
>> > expired, (int)expired->d_name.len, expired->d_name.name);
>> > + ino = autofs4_dentry_ino(expired);
>>
>> If we get here, ino is already set to the autofs4_dentry_ino(expired),
>> so this statement is redundant.
>
> Almost but see above.

Ah, you're right, I missed that.

Cheers,

Jeff
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/