in cpu_dumpconf(), don't panic() if we can't bdevsw_lookup() the
dumpdev. this occurs when we try to set the dumpdev to a device with no driver loaded. this fixes PR#34872. in sys_swapctl, if bdevsw_lookup() fails, set dumpdev = NODEV before calling cpu_dumpconf(). (this also fixes PR#34872.) XXX: cpu_dumpconf() should probably be changed to take a dumpdev XXX: and return an error in such cases, but that is a much more XXX: intrusive change. XXX2: this is only run-tested on sparc64 and compile tested on a XXX2: couple of platforms.
This commit is contained in:
parent
1c6384e73d
commit
648bbec934
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.288 2005/12/11 12:16:10 christos Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.289 2006/10/21 05:54:31 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
|
||||
@ -75,7 +75,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.288 2005/12/11 12:16:10 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.289 2006/10/21 05:54:31 mrg Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -1177,8 +1177,10 @@ cpu_dumpconf()
|
||||
if (dumpdev == NODEV)
|
||||
goto bad;
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev == NULL)
|
||||
panic("dumpconf: bad dumpdev=0x%x", dumpdev);
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
goto bad;
|
||||
}
|
||||
if (bdev->d_psize == NULL)
|
||||
goto bad;
|
||||
nblks = (*bdev->d_psize)(dumpdev);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.42 2006/10/05 15:10:31 chs Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.43 2006/10/21 05:54:31 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998, 2000 The NetBSD Foundation, Inc.
|
||||
@ -72,7 +72,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.42 2006/10/05 15:10:31 chs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.43 2006/10/21 05:54:31 mrg Exp $");
|
||||
|
||||
#include "opt_user_ldt.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -710,8 +710,10 @@ cpu_dumpconf(void)
|
||||
if (dumpdev == NODEV)
|
||||
goto bad;
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev == NULL)
|
||||
panic("dumpconf: bad dumpdev=0x%x", dumpdev);
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
goto bad;
|
||||
}
|
||||
if (bdev->d_psize == NULL)
|
||||
goto bad;
|
||||
nblks = (*bdev->d_psize)(dumpdev);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.196 2006/06/09 21:29:39 aymeric Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.197 2006/10/21 05:54:31 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
|
||||
@ -85,7 +85,7 @@
|
||||
#include "opt_panicbutton.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.196 2006/06/09 21:29:39 aymeric Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.197 2006/10/21 05:54:31 mrg Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -620,8 +620,11 @@ cpu_dumpconf()
|
||||
m->ram_segs[1].size = memlist->m_seg[i].ms_size;
|
||||
break;
|
||||
}
|
||||
if ((bdev = bdevsw_lookup(dumpdev)) != NULL &&
|
||||
bdev->d_psize != NULL) {
|
||||
if ((bdev = bdevsw_lookup(dumpdev) == NULL) {
|
||||
dumpdev = NODEV;
|
||||
return;
|
||||
}
|
||||
if (bdev->d_psize != NULL) {
|
||||
nblks = (*bdev->d_psize)(dumpdev);
|
||||
if (dumpsize > btoc(dbtob(nblks - dumplo)))
|
||||
dumpsize = btoc(dbtob(nblks - dumplo));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: stubs.c,v 1.15 2005/12/11 12:16:41 christos Exp $ */
|
||||
/* $NetBSD: stubs.c,v 1.16 2006/10/21 05:54:31 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1998 Mark Brinicombe.
|
||||
@ -41,7 +41,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: stubs.c,v 1.15 2005/12/11 12:16:41 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: stubs.c,v 1.16 2006/10/21 05:54:31 mrg Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -84,8 +84,10 @@ cpu_dumpconf()
|
||||
if (dumpdev == NODEV)
|
||||
return;
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev == NULL)
|
||||
panic("dumpconf: bad dumpdev=0x%x", dumpdev);
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
return;
|
||||
}
|
||||
if (bdev->d_psize == NULL)
|
||||
return;
|
||||
nblks = (*bdev->d_psize)(dumpdev);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.139 2005/12/24 22:45:34 perry Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.140 2006/10/21 05:54:31 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
|
||||
@ -77,7 +77,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.139 2005/12/24 22:45:34 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.140 2006/10/21 05:54:31 mrg Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_compat_netbsd.h"
|
||||
@ -492,7 +492,11 @@ cpu_dumpconf()
|
||||
|
||||
if (dumpdev != NODEV) {
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev != NULL && bdev->d_psize != NULL) {
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
return;
|
||||
}
|
||||
if (bdev->d_psize != NULL) {
|
||||
nblks = (*bdev->d_psize)(dumpdev);
|
||||
if (dumpsize > btoc(dbtob(nblks - dumplo)))
|
||||
dumpsize = btoc(dbtob(nblks - dumplo));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.32 2005/12/27 07:25:57 yamt Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.33 2006/10/21 05:54:31 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
@ -77,7 +77,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.32 2005/12/27 07:25:57 yamt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.33 2006/10/21 05:54:31 mrg Exp $");
|
||||
|
||||
#include "opt_bufcache.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -493,8 +493,10 @@ cpu_dumpconf()
|
||||
if (dumpdev == NODEV)
|
||||
return;
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev == NULL)
|
||||
panic("dumpconf: bad dumpdev=0x%x", dumpdev);
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
return;
|
||||
}
|
||||
if (bdev->d_psize == NULL)
|
||||
return;
|
||||
nblks = (*bdev->d_psize)(dumpdev);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.188 2006/07/21 10:01:40 tsutsui Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.189 2006/10/21 05:54:31 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
@ -77,7 +77,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.188 2006/07/21 10:01:40 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.189 2006/10/21 05:54:31 mrg Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_compat_hpux.h"
|
||||
@ -828,8 +828,10 @@ cpu_dumpconf(void)
|
||||
if (dumpdev == NODEV)
|
||||
return;
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev == NULL)
|
||||
panic("dumpconf: bad dumpdev=0x%x", dumpdev);
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
return;
|
||||
}
|
||||
if (bdev->d_psize == NULL)
|
||||
return;
|
||||
nblks = (*bdev->d_psize)(dumpdev);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: autoconf.c,v 1.22 2006/02/26 05:31:54 thorpej Exp $ */
|
||||
/* $NetBSD: autoconf.c,v 1.23 2006/10/21 05:54:32 mrg Exp $ */
|
||||
|
||||
/* $OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $ */
|
||||
|
||||
@ -86,7 +86,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.22 2006/02/26 05:31:54 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.23 2006/10/21 05:54:32 mrg Exp $");
|
||||
|
||||
#include "opt_kgdb.h"
|
||||
#include "opt_useleds.h"
|
||||
@ -280,8 +280,10 @@ cpu_dumpconf(void)
|
||||
if (dumpdev == NODEV)
|
||||
goto bad;
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev == NULL)
|
||||
panic("dumpconf: bad dumpdev=0x%x", dumpdev);
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
goto bad;
|
||||
}
|
||||
if (bdev->d_psize == NULL)
|
||||
goto bad;
|
||||
nblks = (*bdev->d_psize)(dumpdev);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.581 2006/10/12 04:31:54 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.582 2006/10/21 05:54:32 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006 The NetBSD Foundation, Inc.
|
||||
@ -72,7 +72,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.581 2006/10/12 04:31:54 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.582 2006/10/21 05:54:32 mrg Exp $");
|
||||
|
||||
#include "opt_beep.h"
|
||||
#include "opt_compat_ibcs2.h"
|
||||
@ -1036,8 +1036,10 @@ cpu_dumpconf()
|
||||
if (dumpdev == NODEV)
|
||||
goto bad;
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev == NULL)
|
||||
panic("dumpconf: bad dumpdev=0x%x", dumpdev);
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
goto out;
|
||||
}
|
||||
if (bdev->d_psize == NULL)
|
||||
goto bad;
|
||||
nblks = (*bdev->d_psize)(dumpdev);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.46 2006/09/14 15:04:07 gdamore Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.47 2006/10/21 05:54:32 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.46 2006/09/14 15:04:07 gdamore Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.47 2006/10/21 05:54:32 mrg Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -572,8 +572,10 @@ cpu_dumpconf()
|
||||
if (dumpdev == NODEV)
|
||||
return;
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev == NULL)
|
||||
panic("dumpconf: bad dumpdev=0x%x", dumpdev);
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
return;
|
||||
}
|
||||
if (bdev->d_psize == NULL)
|
||||
return;
|
||||
nblks = (*bdev->d_psize)(dumpdev);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.308 2005/12/24 20:07:15 perry Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.309 2006/10/21 05:54:32 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1990 The Regents of the University of California.
|
||||
@ -107,7 +107,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.308 2005/12/24 20:07:15 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.309 2006/10/21 05:54:32 mrg Exp $");
|
||||
|
||||
#include "opt_adb.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -745,8 +745,10 @@ cpu_dumpconf(void)
|
||||
return;
|
||||
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev == NULL)
|
||||
panic("dumpconf: bad dumpdev=0x%x", dumpdev);
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
return;
|
||||
}
|
||||
if (bdev->d_psize == NULL)
|
||||
return;
|
||||
nblks = (*bdev->d_psize)(dumpdev);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mips_machdep.c,v 1.187 2006/08/26 20:18:36 matt Exp $ */
|
||||
/* $NetBSD: mips_machdep.c,v 1.188 2006/10/21 05:54:32 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2002 Wasabi Systems, Inc.
|
||||
@ -119,7 +119,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.187 2006/08/26 20:18:36 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.188 2006/10/21 05:54:32 mrg Exp $");
|
||||
|
||||
#include "opt_cputype.h"
|
||||
|
||||
@ -1317,8 +1317,10 @@ cpu_dumpconf(void)
|
||||
if (dumpdev == NODEV)
|
||||
goto bad;
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev == NULL)
|
||||
panic("dumpconf: bad dumpdev=0x%x", dumpdev);
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
return;
|
||||
}
|
||||
if (bdev->d_psize == NULL)
|
||||
goto bad;
|
||||
nblks = (*bdev->d_psize)(dumpdev);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.115 2006/08/04 01:58:49 mhitch Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.116 2006/10/21 05:54:32 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
@ -77,7 +77,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.115 2006/08/04 01:58:49 mhitch Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.116 2006/10/21 05:54:32 mrg Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_compat_hpux.h"
|
||||
@ -933,8 +933,10 @@ cpu_dumpconf()
|
||||
if (dumpdev == NODEV)
|
||||
goto bad;
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev == NULL)
|
||||
panic("dumpconf: bad dumpdev=0x%x", dumpdev);
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
goto bad;
|
||||
}
|
||||
if (bdev->d_psize == NULL)
|
||||
goto bad;
|
||||
nblks = (*bdev->d_psize)(dumpdev);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.62 2005/12/11 12:18:23 christos Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.63 2006/10/21 05:54:32 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
@ -77,7 +77,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.62 2005/12/11 12:18:23 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.63 2006/10/21 05:54:32 mrg Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_compat_netbsd.h"
|
||||
@ -562,8 +562,10 @@ cpu_dumpconf(void)
|
||||
if (dumpdev == NODEV)
|
||||
return;
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev == NULL)
|
||||
panic("dumpconf: bad dumpdev=0x%x", dumpdev);
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
return;
|
||||
}
|
||||
if (bdev->d_psize == NULL)
|
||||
return;
|
||||
nblks = (*bdev->d_psize)(dumpdev);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.74 2005/12/11 12:18:29 christos Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.75 2006/10/21 05:54:32 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Darrin B. Jewell
|
||||
@ -79,7 +79,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.74 2005/12/11 12:18:29 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.75 2006/10/21 05:54:32 mrg Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -722,8 +722,10 @@ cpu_dumpconf(void)
|
||||
if (dumpdev == NODEV)
|
||||
return;
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev == NULL)
|
||||
panic("dumpconf: bad dumpdev=0x%x", dumpdev);
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
return;
|
||||
}
|
||||
if (bdev->d_psize == NULL)
|
||||
return;
|
||||
nblks = (*bdev->d_psize)(dumpdev);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.164 2006/05/12 06:05:23 simonb Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.165 2006/10/21 05:54:32 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1987, 1990 The Regents of the University of California.
|
||||
@ -75,7 +75,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.164 2006/05/12 06:05:23 simonb Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.165 2006/10/21 05:54:32 mrg Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -625,8 +625,10 @@ cpu_dumpconf(void)
|
||||
if (dumpdev == NODEV)
|
||||
return;
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev == NULL)
|
||||
panic("dumpconf: bad dumpdev=0x%x", dumpdev);
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
return;
|
||||
}
|
||||
if (bdev->d_psize == NULL)
|
||||
goto bad;
|
||||
nblks = (*bdev->d_psize)(dumpdev);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: powerpc_machdep.c,v 1.31 2006/08/05 21:26:49 sanjayl Exp $ */
|
||||
/* $NetBSD: powerpc_machdep.c,v 1.32 2006/10/21 05:54:32 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: powerpc_machdep.c,v 1.31 2006/08/05 21:26:49 sanjayl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: powerpc_machdep.c,v 1.32 2006/10/21 05:54:32 mrg Exp $");
|
||||
|
||||
#include "opt_altivec.h"
|
||||
|
||||
@ -204,8 +204,10 @@ cpu_dumpconf(void)
|
||||
if (dumpdev == NODEV)
|
||||
return;
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev == NULL)
|
||||
panic("dumpconf: bad dumpdev=0x%x", dumpdev);
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
return;
|
||||
}
|
||||
if (bdev->d_psize == NULL)
|
||||
return;
|
||||
nblks = (*bdev->d_psize)(dumpdev);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.43 2006/10/03 13:02:32 tsutsui Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.44 2006/10/21 05:54:33 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
@ -160,7 +160,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.43 2006/10/03 13:02:32 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.44 2006/10/21 05:54:33 mrg Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -630,8 +630,10 @@ cpu_dumpconf(void)
|
||||
return;
|
||||
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev == NULL)
|
||||
panic("dumpconf: bad dumpdev=0x%x", dumpdev);
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
return;
|
||||
}
|
||||
getsize = bdev->d_psize;
|
||||
if (getsize == NULL)
|
||||
return;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.177 2006/10/05 14:46:11 tsutsui Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.178 2006/10/21 05:54:33 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
@ -78,7 +78,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.177 2006/10/05 14:46:11 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.178 2006/10/21 05:54:33 mrg Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -535,8 +535,10 @@ cpu_dumpconf(void)
|
||||
return;
|
||||
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev == NULL)
|
||||
panic("dumpconf: bad dumpdev=0x%x", dumpdev);
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
return;
|
||||
}
|
||||
getsize = bdev->d_psize;
|
||||
if (getsize == NULL)
|
||||
return;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.103 2006/10/05 14:46:12 tsutsui Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.104 2006/10/21 05:54:33 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
@ -75,7 +75,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.103 2006/10/05 14:46:12 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.104 2006/10/21 05:54:33 mrg Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -562,8 +562,10 @@ cpu_dumpconf(void)
|
||||
return;
|
||||
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev == NULL)
|
||||
panic("dumpconf: bad dumpdev=0x%x", dumpdev);
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
return;
|
||||
}
|
||||
getsize = bdev->d_psize;
|
||||
if (getsize == NULL)
|
||||
return;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.132 2006/08/04 02:17:34 mhitch Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.133 2006/10/21 05:54:33 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
@ -77,7 +77,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.132 2006/08/04 02:17:34 mhitch Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.133 2006/10/21 05:54:33 mrg Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -670,8 +670,10 @@ cpu_dumpconf(void)
|
||||
if (dumpdev == NODEV)
|
||||
return;
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev == NULL)
|
||||
panic("dumpconf: bad dumpdev=0x%x", dumpdev);
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
return;
|
||||
}
|
||||
if (bdev->d_psize == NULL)
|
||||
return;
|
||||
nblks = (*bdev->d_psize)(dumpdev);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.28 2006/05/22 13:44:53 yamt Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.29 2006/10/21 05:54:33 mrg Exp $ */
|
||||
/* NetBSD: machdep.c,v 1.559 2004/07/22 15:12:46 mycroft Exp */
|
||||
|
||||
/*-
|
||||
@ -73,7 +73,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.28 2006/05/22 13:44:53 yamt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.29 2006/10/21 05:54:33 mrg Exp $");
|
||||
|
||||
#include "opt_beep.h"
|
||||
#include "opt_compat_ibcs2.h"
|
||||
@ -984,8 +984,10 @@ cpu_dumpconf()
|
||||
if (dumpdev == NODEV)
|
||||
goto bad;
|
||||
bdev = bdevsw_lookup(dumpdev);
|
||||
if (bdev == NULL)
|
||||
panic("dumpconf: bad dumpdev=0x%x", dumpdev);
|
||||
if (bdev == NULL) {
|
||||
dumpdev = NODEV;
|
||||
return;
|
||||
}
|
||||
if (bdev->d_psize == NULL)
|
||||
goto bad;
|
||||
nblks = (*bdev->d_psize)(dumpdev);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: uvm_swap.c,v 1.108 2006/10/12 04:35:40 thorpej Exp $ */
|
||||
/* $NetBSD: uvm_swap.c,v 1.109 2006/10/21 05:54:34 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997 Matthew R. Green
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.108 2006/10/12 04:35:40 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.109 2006/10/21 05:54:34 mrg Exp $");
|
||||
|
||||
#include "fs_nfs.h"
|
||||
#include "opt_uvmhist.h"
|
||||
@ -565,7 +565,10 @@ sys_swapctl(struct lwp *l, void *v, register_t *retval)
|
||||
error = ENOTBLK;
|
||||
break;
|
||||
}
|
||||
dumpdev = vp->v_rdev;
|
||||
if (bdevsw_lookup(vp->v_rdev))
|
||||
dumpdev = vp->v_rdev;
|
||||
else
|
||||
dumpdev = NODEV;
|
||||
cpu_dumpconf();
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user