Rather than entering the debugger via kdb_enter() when detecting memory

corruption under SMBUFS_NAME_DEBUG, panic() with the same error message.
This commit is contained in:
rwatson 2007-05-27 13:12:36 +00:00
parent b3193c8a43
commit d162983163

View File

@ -140,22 +140,16 @@ smbfs_name_free(u_char *name)
cp = name;
cp--;
if (*cp != 0xfc) {
printf("First byte of name entry '%s' corrupted\n", name);
kdb_enter("ditto");
}
if (*cp != 0xfc)
panic("First byte of name entry '%s' corrupted", name);
cp -= sizeof(int);
nmlen = *(int*)cp;
slen = strlen(name) + 1;
if (nmlen != slen) {
printf("Name length mismatch: was %d, now %d name '%s'\n",
if (nmlen != slen)
panic("Name length mismatch: was %d, now %d name '%s'",
nmlen, slen, name);
kdb_enter("ditto");
}
if (name[nmlen] != 0xfe) {
printf("Last byte of name entry '%s' corrupted\n", name);
kdb_enter("ditto");
}
if (name[nmlen] != 0xfe)
panic("Last byte of name entry '%s' corrupted\n", name);
free(cp, M_SMBNODENAME);
#else
free(name, M_SMBNODENAME);