Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6-0]: src/sys/dev/pci Pull up following revision(s) (requested by...



details:   https://anonhg.NetBSD.org/src/rev/ad99249b27cf
branches:  netbsd-6-0
changeset: 774987:ad99249b27cf
user:      snj <snj%NetBSD.org@localhost>
date:      Sat Sep 13 17:54:26 2014 +0000

description:
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.

diffstat:

 sys/dev/pci/pci_usrreq.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 6636894ceb49 -r ad99249b27cf sys/dev/pci/pci_usrreq.c
--- a/sys/dev/pci/pci_usrreq.c  Tue Sep 09 08:50:06 2014 +0000
+++ b/sys/dev/pci/pci_usrreq.c  Sat Sep 13 17:54:26 2014 +0000
@@ -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.14.1 2014/09/13 17:54:26 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.14.1 2014/09/13 17:54:26 snj 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