From fa669ab7b852cb923c3402a61822f4ad7749f0eb Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Fri, 25 Oct 2002 08:40:20 +0000 Subject: [PATCH] Disable the kernacc() check in mtx_validate() until such time that kernacc does not require Giant. This means that we may miss panics on a class of mutex programming bugs, but only if running with a Chernobyl setting of debug-flags. Spotted by: Pete Carah --- sys/kern/kern_mutex.c | 5 +++++ sys/kern/subr_turnstile.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index a52e25a2db0d..1a32471f0ac0 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -858,6 +858,10 @@ void mtx_validate(struct mtx *m) { +/* + * XXX: When kernacc() does not require Giant we can reenable this check + */ +#ifdef notyet /* * XXX - When kernacc() is fixed on the alpha to handle K0_SEG memory properly * we can re-enable the kernacc() checks. @@ -873,6 +877,7 @@ mtx_validate(struct mtx *m) VM_PROT_READ | VM_PROT_WRITE)) panic("Can't read and write to mutex %p", m); #endif +#endif } #endif diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index a52e25a2db0d..1a32471f0ac0 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -858,6 +858,10 @@ void mtx_validate(struct mtx *m) { +/* + * XXX: When kernacc() does not require Giant we can reenable this check + */ +#ifdef notyet /* * XXX - When kernacc() is fixed on the alpha to handle K0_SEG memory properly * we can re-enable the kernacc() checks. @@ -873,6 +877,7 @@ mtx_validate(struct mtx *m) VM_PROT_READ | VM_PROT_WRITE)) panic("Can't read and write to mutex %p", m); #endif +#endif } #endif