Re: Unmatched semaphore usage in fs/super.c

From: Al Viro
Date: Sun Mar 02 2008 - 02:58:57 EST


On Sun, Mar 02, 2008 at 03:10:35PM +0800, Peter Teoh wrote:
> Please pardon me if wrong. In fs/super.c, I saw a down_read()
> without a matching (when sb->s_root is non-zero) up_read() as shown
> below:

Correct. get_super() and user_get_super() return locked superblock.

> Neither did the get_super() caller remember and correct the semaphore
> either. Is this a problem?

It would be, if it would be true. Take a look at drop_super().
--
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/