NetBSD-Bugs archive

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

kern/52334: vte driver: sleep-in-interrupt bugs in vte_intr



>Number:         52334
>Category:       kern
>Synopsis:       vte driver: sleep-in-interrupt bugs in vte_intr
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 25 08:55:00 +0000 2017
>Originator:     Jia-Ju Bai
>Release:        NetBSD-7.1
>Organization:
Tsinghua University
>Environment:
i386
>Description:
The driver may sleep in interrupt, and the function call path in file "sys/dev/pci/if_vte.c" in NetBSD-7.1 release is:
vte_intr [interrupt handler function]
  vte_ifstart
    vte_encap
      bus_dmamap_load_mbuf(BUS_DMA_WAITOK) --> may sleep
vte_intr [interrupt handler function]
  vte_rxeof
    vte_newbuf
      bus_dmamap_load_mbuf(BUS_DMA_WAITOK) --> may sleep

These bugs are found by a static analysis tool written by myself, and they are checked by my review of the NetBSD code.
>How-To-Repeat:

>Fix:
The possible fix of this bug is to replace "BUS_DMA_WAITOK" with "BUS_DMA_NOWAIT".



Home | Main Index | Thread Index | Old Index