bin/58912: dump fails on big directories with nodump flag set

vpaepcke at dssgmbh.de vpaepcke at dssgmbh.de
Tue Nov 4 01:30:22 PST 2003


>Number:         58912
>Category:       bin
>Synopsis:       dump fails on big directories with nodump flag set
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 04 01:30:18 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Volker Paepcke <vpaepcke at incore.de>
>Release:        FreeBSD 4.9-PRERELEASE i386
>Organization:
DSS Incore-Service GmbH - http//www.incore.de
>Environment:
System: FreeBSD uxpae.incore 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #2: Sat Sep 6 13:17:54 CEST 2003 root at uxpae.incore:/ad0/opt/obj/usr/src/sys/UXPAE i386

	All stable and current versions are affected by this error!
>Description:
	Dump doesn't propagate the nodump flag on big directories
	correctly. Only the entries contained in the first block
	are propagated. All further entries are simply skipped
	and may be dumped despite the nodump flag.
>How-To-Repeat:
	Create a directory with a size bigger than one block.
	Set the nodump flag on this directory and backup the
	filesystem containing this directory.
>Fix:
	There is a bug in /usr/src/sbin/dump/traverse.c:
	The inode buffer referenced by dp may change during the
	the call to searchdir() and may not be used thereafter.
	The inode buffer di containing a copy of the original one 
	must be used instead.

*** /usr/src/sbin/dump/traverse.c.1st   Sat Aug 30 12:33:03 2003
--- /usr/src/sbin/dump/traverse.c       Tue Nov  4 09:46:43 2003
***************
*** 232,238 ****
                for (ret = 0, i = 0; filesize > 0 && i < NDADDR; i++) {
                        if (di.di_db[i] != 0)
                                ret |= searchdir(ino, di.di_db[i],
!                                       (long)dblksize(sblock, dp, i),
                                        filesize, tapesize, nodump);
                        if (ret & HASDUMPEDFILE)
                                filesize = 0;
--- 232,238 ----
                for (ret = 0, i = 0; filesize > 0 && i < NDADDR; i++) {
                        if (di.di_db[i] != 0)
                                ret |= searchdir(ino, di.di_db[i],
!                                       (long)dblksize(sblock, &di, i),
                                        filesize, tapesize, nodump);
                        if (ret & HASDUMPEDFILE)
                                filesize = 0;
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list