summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2006-08-21 17:20:19 +0000
committerkib <kib@FreeBSD.org>2006-08-21 17:20:19 +0000
commit6b3e18253177a17fcd1083cebac69ea449b55a57 (patch)
treed9b2f5c25edfb53138f127cbfef320fa69d41521 /sys/ufs
parent1e80c6d4b6d3c03b582b475466f209323388598a (diff)
downloadFreeBSD-src-6b3e18253177a17fcd1083cebac69ea449b55a57.zip
FreeBSD-src-6b3e18253177a17fcd1083cebac69ea449b55a57.tar.gz
While checking for update of snapshot file in the ffs_copyonwrite,
first filter out metadata update. Otherwise, devfs vnode could be erronously interpreted as ufs one, causing further check of i_flags to use random memory. PR: kern/100365 Debugged and fix described by: tegge Approved by: pjd (mentor) MFC after: 2 weeks
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_snapshot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index 79afa44..b183569 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -2091,7 +2091,7 @@ ffs_copyonwrite(devvp, bp)
int launched_async_io, prev_norunningbuf;
long saved_runningbufspace;
- if ((VTOI(bp->b_vp)->i_flags & SF_SNAPSHOT) != 0)
+ if (devvp != bp->b_vp && (VTOI(bp->b_vp)->i_flags & SF_SNAPSHOT) != 0)
return (0); /* Update on a snapshot file */
if (td->td_pflags & TDP_COWINPROGRESS)
panic("ffs_copyonwrite: recursive call");
OpenPOWER on IntegriCloud