Print this page
NEX-14413 Bad trap in module "apix" due to a NULL pointer dereference
Reviewed by: Steve Peng <steve.peng@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Rob Gittins <rob.gittins@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/io/pci/pci_common.c
          +++ new/usr/src/uts/i86pc/io/pci/pci_common.c
↓ open down ↓ 967 lines elided ↑ open up ↑
 968  968          ispec = (struct intrspec *)pci_intx_get_ispec(pdip, rdip, (int)inum);
 969  969          if (ispec == NULL)
 970  970                  return;
 971  971          if (DDI_INTR_IS_MSI_OR_MSIX(hdlp->ih_type)) {
 972  972                  ispec->intrspec_vec = inum;
 973  973                  ispec->intrspec_pri = hdlp->ih_pri;
 974  974          }
 975  975          ihdl_plat_datap->ip_ispecp = ispec;
 976  976  
 977  977          /* translate the interrupt if needed */
 978      -        (void) (*psm_intr_ops)(rdip, hdlp, PSM_INTR_OP_XLATE_VECTOR, &irq);
 979      -
 980      -        /* Disable the interrupt handler */
 981      -        rem_avintr((void *)hdlp, hdlp->ih_pri, hdlp->ih_cb_func, irq);
 982      -        ihdl_plat_datap->ip_ispecp = NULL;
      978 +        if ((*psm_intr_ops)(rdip, hdlp, PSM_INTR_OP_XLATE_VECTOR, &irq) !=
      979 +            PSM_FAILURE) {
      980 +                /* Disable the interrupt handler */
      981 +                rem_avintr((void *)hdlp, hdlp->ih_pri, hdlp->ih_cb_func, irq);
      982 +                ihdl_plat_datap->ip_ispecp = NULL;
      983 +        }
 983  984  }
 984  985  
 985  986  /*
 986  987   * Miscellaneous library function
 987  988   */
 988  989  int
 989  990  pci_common_get_reg_prop(dev_info_t *dip, pci_regspec_t *pci_rp)
 990  991  {
 991  992          int             i;
 992  993          int             number;
↓ open down ↓ 769 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX