Details
-
Bug
-
Resolution: Fixed
-
Critical
-
Lustre 2.5.0
-
3
-
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.