Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Reject unaligned PCI config register ioctl reque...
details: https://anonhg.NetBSD.org/src/rev/cfa748c45147
branches: trunk
changeset: 796280:cfa748c45147
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed May 28 04:41:52 2014 +0000
description:
Reject unaligned PCI config register ioctl requests before we kassert.
diffstat:
sys/dev/pci/pci_usrreq.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r b2608567c28b -r cfa748c45147 sys/dev/pci/pci_usrreq.c
--- a/sys/dev/pci/pci_usrreq.c Wed May 28 03:17:42 2014 +0000
+++ b/sys/dev/pci/pci_usrreq.c Wed May 28 04:41:52 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_usrreq.c,v 1.25 2014/03/16 05:20:28 dholland Exp $ */
+/* $NetBSD: pci_usrreq.c,v 1.26 2014/05/28 04:41:52 riastradh Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_usrreq.c,v 1.25 2014/03/16 05:20:28 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_usrreq.c,v 1.26 2014/05/28 04:41:52 riastradh Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -83,7 +83,7 @@
case PCI_IOC_BDF_CFGWRITE:
bdfr = data;
if (bdfr->bus > 255 || bdfr->device >= sc->sc_maxndevs ||
- bdfr->function > 7)
+ bdfr->function > 7 || ISSET(bdfr->cfgreg.reg, 3))
return EINVAL;
tag = pci_make_tag(sc->sc_pc, bdfr->bus, bdfr->device,
bdfr->function);
Home |
Main Index |
Thread Index |
Old Index