Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.8.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      smatch highlights this interesting bit of code in LNetCtl:

                      config = arg;
      
                      if (config->cfg_hdr.ioc_len < total)
                              return -EINVAL;
      
                      net_config = (struct lnet_ioctl_net_config *)
                              config->cfg_bulk;
                      if (config == NULL || net_config == NULL)
                              return -1;
      

      notic how we assume config can be NULL way after we defererenced it multiple times. should we move the check?

      Attachments

        Activity

          [LU-6502] Strange check for NULL in LNetCtl
          pjones Peter Jones made changes -
          Fix Version/s New: Lustre 2.8.0 [ 11113 ]
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          green Oleg Drokin made changes -
          Assignee Original: WC Triage [ wc-triage ] New: Amir Shehata [ ashehata ]
          green Oleg Drokin created issue -

          People

            ashehata Amir Shehata (Inactive)
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: