Re: infinite loop in ffs_sync()
Re: infinite loop in ffs_sync()
- Subject: Re: infinite loop in ffs_sync()
- From: Brian Bergstrand <email@hidden>
- Date: Tue, 27 Jul 2004 10:03:10 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
In theory, this is a bug, but in practice, it won't be a problem. This
is because all simple_lock ops are noops in all currently shipping
kernels. They are all defined out in <sys/lock.h>. I found a deadlock
in vget() over a year ago that I reported (#3193564) and it was closed
as "Behaves Correctly" for this same reason. Darwin VFS's current
position is "the funnel protects all".
On Jul 27, 2004, at 6:28 AM, Nikita Danilov wrote:
>
Hello,
>
>
xnu/bsd/ufs/ffs/ffs_vfsops.c:ffs_sync() contains
>
>
----------------------------------------------------------------------
>
/*
>
* Write back each (modified) inode.
>
*/
>
simple_lock(&mntvnode_slock);
>
loop:
>
for (vp = mp->mnt_vnodelist.lh_first;
>
vp != NULL;
>
vp = nvp) {
>
int didhold = 0;
>
>
/*
>
* If the vnode that we are about to sync is no longer
>
* associated with this mount point, start over.
>
*/
>
if (vp->v_mount != mp)
>
goto loop;
>
----------------------------------------------------------------------
>
>
As mp->mnt_vnodelist is protected by mntvnode_slock lock, which is not
>
released here, offending vnode cannot be removed from the list, and
>
goto
>
loop is infinite.
>
>
Exactly the same bug was present in the ffs_vfsops.c:1.232 (Fri Apr 30
>
23:14:30 2004) version of this file in FreeBSD, but is fixed in FreeBSD
>
HEAD.
>
Brian Bergstrand <
http://www.bergstrand.org/brian/>, AIM: triryche206
PGP Key: <
http://www.bergstrand.org/brian/misc/public_key.txt>
There are no innocents in a world with the F.B.I. and Carnivore. - U.F.
000802
As of 10:02:03 AM, iTunes is playing "Let You Down" from "Three Days
Grace" by "Three Days Grace"
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.1
iQA+AwUBQQZgpHnR2Fu2x7aiEQJTNQCY72ZSpQ86YM44XtWiIw/5GVS0WQCg016O
iLB3KDphNlk/flSwotVFKf0=
=m2c0
-----END PGP SIGNATURE-----
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.