Re: broken __IS_FLG() <linux/fs.h> in 2.4.0-test6-pre?

From: Alexander Viro (viro@math.psu.edu)
Date: Tue Aug 08 2000 - 19:21:50 EST


On Wed, 9 Aug 2000, Mikael Pettersson wrote:

> Note that (inode)->i_sb is now unconditionally dereferenced.
>
> Is this a bug or aren't anonymous i_sb-less inodes permitted anymore?

The latter.

> I have a module which exports "objects" to user-space as anonymous
> files, and the underlying inodes have NULL i_sb fields.

Erm... I guess that you've never tried to do ls -l /proc/<pid>/fd for
processes blessed by such a gift?

> This breaks in test6-pre2 and later because mmap(..,MAP_SHARED,..)
> calls locks_verify_locked(), which in turn evaluates __IS_FLG()
> [via MANDATORY_LOCK and IS_MANDLOCK]. Since test6-pre2 removed
> the i_sb NULL test, this causes a NULL pointer dereference.
>
> I can work around this by attaching my inodes to a dummy superblock
> a la pipefs, but I'd rather not if I can avoid it.

Sorry. NULL ->i_sb is officially dead. Every object belongs to some
filesystem. If you want help with converting your stuff - send me an URL
to the source, OK?

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



This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:16 EST