Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi Don't kdassert about crap provided by the firmw...
details: https://anonhg.NetBSD.org/src/rev/fbdbe43b7e00
branches: trunk
changeset: 332660:fbdbe43b7e00
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Oct 02 12:42:12 2014 +0000
description:
Don't kdassert about crap provided by the firmware.
diffstat:
sys/dev/acpi/acpi_bat.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r b3745abbeadf -r fbdbe43b7e00 sys/dev/acpi/acpi_bat.c
--- a/sys/dev/acpi/acpi_bat.c Thu Oct 02 12:25:14 2014 +0000
+++ b/sys/dev/acpi/acpi_bat.c Thu Oct 02 12:42:12 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_bat.c,v 1.112 2012/08/14 14:36:43 jruoho Exp $ */
+/* $NetBSD: acpi_bat.c,v 1.113 2014/10/02 12:42:12 riastradh Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.112 2012/08/14 14:36:43 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.113 2014/10/02 12:42:12 riastradh Exp $");
#include <sys/param.h>
#include <sys/condvar.h>
@@ -381,7 +381,10 @@
goto out;
}
- KDASSERT((uint64_t)elm[i].Integer.Value < INT_MAX);
+ if (elm[i].Integer.Value >= INT_MAX) {
+ rv = AE_LIMIT;
+ goto out;
+ }
}
if ((elm[ACPIBAT_BIF_UNIT].Integer.Value & ACPIBAT_PWRUNIT_MA) != 0) {
Home |
Main Index |
Thread Index |
Old Index