Page MenuHomeFreeBSD

Fix coverity CID: 1391235, 1193654 and 1193651 (Unchecked return value)
ClosedPublic

Authored by araujo on May 23 2018, 9:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 11, 8:14 PM
Unknown Object (File)
Wed, Oct 8, 12:23 AM
Unknown Object (File)
Wed, Sep 24, 9:18 PM
Unknown Object (File)
Sep 16 2025, 2:12 AM
Unknown Object (File)
Sep 14 2025, 7:45 PM
Unknown Object (File)
Sep 10 2025, 9:56 AM
Unknown Object (File)
Sep 9 2025, 1:10 PM
Unknown Object (File)
Aug 27 2025, 7:36 PM
Subscribers

Details

Summary

pthread_rwlock_unlock(3) returns 0 if successful, otherwise an error number
will be returned to indicate the error, so I'm applying an assert(3) to do
a sanity check of the return value.

Test Plan

Rebuild bhyve with this patch:

  1. Test FreeBSD HEAD as a guest.
  2. Test FreeBSD HEAD as a guest with "wire guest memory -S".

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable