Bug 1464418
| Summary: | tcmu-runner: fix pthread_*() return value checks | ||
|---|---|---|---|
| Product: | [Red Hat Storage] Red Hat Gluster Storage | Reporter: | Prasanna Kumar Kalever <prasanna.kalever> |
| Component: | tcmu-runner | Assignee: | Prasanna Kumar Kalever <prasanna.kalever> |
| Status: | CLOSED ERRATA | QA Contact: | Sweta Anandpara <sanandpa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rhgs-3.3 | CC: | amukherj, prasanna.kalever, rhinduja, rhs-bugs, sanandpa, storage-qa-internal |
| Target Milestone: | --- | ||
| Target Release: | RHGS 3.3.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | 3.3.0-devel-freeze-exception | ||
| Fixed In Version: | tcmu-runner-1.2.0-7.el7rhgs | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-09-21 04:20:54 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1417151 | ||
A round of testing has been done on glusterfs-3.8.4-33 and gluster-block-0.2.1-6. No crashes/issues have been seen, nor are there any unexpected error messages present in the logs. Based on comment 8 and 9, with the developer's and release leads' aggreeement, moving this bug to (conditionally) verified. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:2773 |
Description of problem: In tcmu-runner currently most of the pthread_*() functions return value checks looks like ret = pthread_mutex_init(&lock, NULL); if (ret < 0) { ... } Which is wrong, and this is practiced almost every where they are used. Which could result in unknown behaviors. Fix: Summary of manual pages of all pthread_*() functions, On success, pthread_*() returns 0; on error, they returns an error number ret = pthread_mutex_init(&lock, NULL); if (ret != 0) { ... That magic ... }