Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/2cf8b2ae2d12
branches:  netbsd-6
changeset: 776701:2cf8b2ae2d12
user:      snj <snj%NetBSD.org@localhost>
date:      Sat Sep 13 17:53:15 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 0ade4ab712c3 -r 2cf8b2ae2d12 sys/dev/pci/pci_usrreq.c
--- a/sys/dev/pci/pci_usrreq.c  Tue Sep 09 08:49:13 2014 +0000
+++ b/sys/dev/pci/pci_usrreq.c  Sat Sep 13 17:53:15 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.10.1 2014/09/13 17:53:15 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.10.1 2014/09/13 17:53:15 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