[LU-3683] KUC code treats 0 as an invalid file descriptor Created: 01/Aug/13 Updated: 20/Aug/13 Resolved: 20/Aug/13 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.5.0 |
| Fix Version/s: | Lustre 2.5.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | John Hammond | Assignee: | Bob Glossman (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | HSM, changelog, kuc | ||
| Severity: | 3 |
| Rank (Obsolete): | 9510 |
| Description |
|
struct lustre_kernelcomm uses __u32 for lk_wfd and lk_rfd. But these are initialized using the file descriptors returned by pipe(). Hence 0 is a possible valid value. On cleanup we have tests like if (link->lk_wfd > 0)
close(link->lk_wfd);
and in llapi_changelog_start() we have close(cp->kuc.lk_wfd);
cp->kuc.lk_wfd = 0;
Use of 0 should be replaced with -1U and tests should compare against this value. |
| Comments |
| Comment by Bob Glossman (Inactive) [ 08/Aug/13 ] |
| Comment by Jodi Levi (Inactive) [ 20/Aug/13 ] |
|
Patch landed to master. Please let me know if more work is needed on this ticket and I will reopen. |