Module Name: src
Committed By: snj
Date: Sat Sep 13 17:56:25 UTC 2014
Modified Files:
src/sys/dev/pci [netbsd-6-1]: pci_usrreq.c
Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1124):
sys/dev/pci/pci_usrreq.c: revision 1.26
Reject unaligned PCI config register ioctl requests before we kassert.
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.23.16.1 src/sys/dev/pci/pci_usrreq.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/pci_usrreq.c
diff -u src/sys/dev/pci/pci_usrreq.c:1.23 src/sys/dev/pci/pci_usrreq.c:1.23.16.1
--- src/sys/dev/pci/pci_usrreq.c:1.23 Thu Feb 10 12:37:58 2011
+++ src/sys/dev/pci/pci_usrreq.c Sat Sep 13 17:56:25 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_usrreq.c,v 1.23 2011/02/10 12:37:58 jmcneill Exp $ */
+/* $NetBSD: pci_usrreq.c,v 1.23.16.1 2014/09/13 17:56:25 snj Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_usrreq.c,v 1.23 2011/02/10 12:37:58 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_usrreq.c,v 1.23.16.1 2014/09/13 17:56:25 snj Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -83,7 +83,7 @@ pciioctl(dev_t dev, u_long cmd, void *da
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);