Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-3683

KUC code treats 0 as an invalid file descriptor

    XMLWordPrintable

Details

    • 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.

      Attachments

        Activity

          People

            bogl Bob Glossman (Inactive)
            jhammond John Hammond
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: