panic when mounting device >= 2 times
Pawel Jakub Dawidek
pjd at FreeBSD.org
Wed Oct 14 20:47:08 UTC 2009
On Wed, Oct 14, 2009 at 02:58:56PM +0300, Andriy Gapon wrote:
> on 14/10/2009 14:21 Alexander Best said the following:
> > could somebody have a look at this PR please:
> > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/108968
> > this still exists in -CURRENT.
> This is because of serious and long-standing brokenness (probably from time of
> introduction of GEOM) in g_vfs_open/g_vfs_close.
> The essence:
> 1. we allow multiple concurrent read-only mounts of a device
> 2. but even a read-only mount mangles bufobj of device vnode
> 3. Bug!
> Trivial fix with POLA violation - prohibit concurrent RO mounts.
> Non-trivial fix - _somehow_ avoid changing or depending on device vnode bufobj.
I've this patch that is suppose to fix it:
But AFAIR its not complete. I think it is still possible to remount one
of the read-only mounts to read-write.
Another possibility that comes to my mind is to keep list/array of
consumers in bo_private instead of using one consumer only. This would
be better in terms of access management.
Pawel Jakub Dawidek http://www.wheel.pl
pjd at FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20091014/f1f78f5d/attachment.pgp
More information about the freebsd-current