NetBSD-Bugs archive

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

kern/52330: mpii driver: a sleep-in-interrupt bug in mpii_intr



>Number:         52330
>Category:       kern
>Synopsis:       mpii driver: a sleep-in-interrupt bug in mpii_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:35: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/mpii.c" in NetBSD-7.1 release is:
mpii_intr [interrupt handler function]
  mpii_event_process
    mpii_event_raid
      mpii_cache_enable
        malloc(M_WAITOK) --> may sleep

This bug is found by a static analysis tool written by myself, and it is checked by my review of the NetBSD code.
>How-To-Repeat:

>Fix:
The possible fix of this bug is to replace "M_WAITOK" in malloc with "M_NOWAIT".



Home | Main Index | Thread Index | Old Index