Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: V1.0.1.0, V1.0.2.0, V1.1.0.0
    • Fix Version/s: V1.2.0.0
    • Component/s: Driver
    • Labels:
      None
    • Account:
      SDO Driver (SDODRIVER)

      Description

      The mutex g_pvTkitLock is locked recursively. First in xDriverRestartDevice() and later in cifXTKitRemoveDevice() and cifXTKitAddDevice().

      The mutex itself is created with the attribute PTHREAD_MUTEX_INITIALIZER which means it is non-recursive. The recursive version is PTHREAD_RMUTEX_INITIALIZER.

      The function still works because the default configuration is PTHREAD_MUTEX_DEFAULT which is equivalent to PTHREAD_MUTEX_ERRORCHECK. This will only return an error when the mutex is locked recursively but the program execution will go on.

      Possible solutions:

      • Create mutexes with the attribute PTHREAD_MUTEX_NORMAL, which would cause a deadlock if the mutex is locked recursively.
      • Create mutexes with the attribute PTHREAD_MUTEX_RECURSIVE.
      • Change handling in xDriverRestartDevice().

      xDriverRestartDevice() was introduced in (NXDRVQNX-8)

        Attachments

          Expenses

            Activity

              Status Description

                People

                • Reporter:
                  AMinor Alexander Minor
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: