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

Unitialized variable access in ll_layout_fetch

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      smatch highlighted this piece in ll_layout_fetch():

              struct ptlrpc_request *req;
      ...
              rc = ll_get_default_mdsize(sbi, &lmmsize);
              if (rc == 0)
                      rc = md_getxattr(sbi->ll_md_exp, ll_inode2fid(inode), oc,
                                      OBD_MD_FLXATTR, XATTR_NAME_LOV, NULL, 0,
                                      lmmsize, 0, &req);
              capa_put(oc);
              if (rc < 0)
                      RETURN(rc);
      
              body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
      

      So if ll_get_default_mdsize returns a value bigger than 0, we access uninitialized req variable

      Attachments

        Activity

          People

            wc-triage WC Triage
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: