svn commit: r341399 - head/sys/dev/acpica
Konstantin Belousov
kib at FreeBSD.org
Sun Dec 2 13:27:37 UTC 2018
Author: kib
Date: Sun Dec 2 13:27:36 2018
New Revision: 341399
URL: https://svnweb.freebsd.org/changeset/base/341399
Log:
Fix off by one in hpet_mmap() csw method.
Reported by: C Turt <ecturt at gmail.com>
Reviewed by: alc, markj
Tested by: pho
admbug: 781
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/dev/acpica/acpi_hpet.c
Modified: head/sys/dev/acpica/acpi_hpet.c
==============================================================================
--- head/sys/dev/acpica/acpi_hpet.c Sun Dec 2 13:16:46 2018 (r341398)
+++ head/sys/dev/acpica/acpi_hpet.c Sun Dec 2 13:27:36 2018 (r341399)
@@ -396,7 +396,7 @@ hpet_mmap(struct cdev *cdev, vm_ooffset_t offset, vm_p
struct hpet_softc *sc;
sc = cdev->si_drv1;
- if (offset > rman_get_size(sc->mem_res))
+ if (offset >= rman_get_size(sc->mem_res))
return (EINVAL);
if (!sc->mmap_allow_write && (nprot & PROT_WRITE))
return (EPERM);
More information about the svn-src-all
mailing list