4.2 BSD occasionally trashes files
lee at unmvax.UUCP
lee at unmvax.UUCP
Mon Apr 30 18:30:31 AEST 1984
Subject: 4.2BSD occasionally trashes files
Newsgroups: net.bugs.4bsd
Subject: UNIX 4.2 BSD trashes files
Index: 4.2BSD kernel
Description:
Occasionally files will get trashed. This was reported
earlier but the only "fix" was a stop-gap measure which controlled
the bug by issuing a panic. These mods were made to iput() and
closef().
Repeat-By:
Hard to, it looks to be a race condition.
Fix:
The routine irele() would lock an inode without first checking
to see if such was already locked. Below is a diff of
/sys/sys/ufs_inode.c. I suggest you leave in those panics
for awhile just to make sure....
RCS file: RCS/ufs_inode.c,v
retrieving revision 1.2
diff -r1.2 ufs_inode.c
2c2
< * $Header: ufs_inode.c,v 1.2 84/02/12 22:47:45 root Exp $
---
> * $Header: ufs_inode.c,v 1.3 84/04/30 02:12:19 root Exp $
3a4,11
> * Revision 1.3 84/04/30 02:12:19 root
> * Think I found the bug with trashed files that the stop gap measure
> * (the panic in iput() and closef()) controlled. In irele() it locks
> * the inode but does not check to see if it has already been locked.
> * I am leaving in the stop-gap panics for now but we should know
> * for sure in a month.
> * --Lee
> *
252c260
< ip->i_flag |= ILOCKED;
---
> ilock(ip);
--
--Lee (Ward)
{ucbvax,convex,gatech,pur-ee}!unmvax!lee
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list