Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Jun 2017 03:16:34 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 220238] sys/dev/tws/tws.c: A possible sleep-under-mutex bug in tws_init_reqs
Message-ID:  <bug-220238-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D220238

            Bug ID: 220238
           Summary: sys/dev/tws/tws.c: A possible sleep-under-mutex bug in
                    tws_init_reqs
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: baijiaju1990@163.com

The driver may sleep under a mutex, and code path is:
tws_init_reqs [line 684: acquire the mutex]
tws_init_reqs [line 685]
  bus_dmamap_create(BUS_DMA_WAITOK) [line 687] --> may sleep

The possible fix of this bug is to replace the "BUS_DMA_WAITOK" in
bus_dmamap_create with "BUS_DMA_NOWAIT".

This bug is found by a static analysis tool written by myself, and it is
checked by my review of the FreeBSD code.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-220238-8>