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

mdt_handle_idmap unsafe access to req->rq_export

    XMLWordPrintable

Details

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

    Description

      smatch highlighted this unsafe usage:

      int mdt_handle_idmap(struct tgt_session_info *tsi)
      {
              struct ptlrpc_request   *req = tgt_ses_req(tsi);
              struct mdt_device       *mdt = mdt_exp2dev(req->rq_export);
              struct mdt_export_data *med;
              struct ptlrpc_user_desc *pud = req->rq_user_desc;
              struct md_identity *identity;
              __u32 opc;
              int rc = 0;
              ENTRY;
      
              if (!req->rq_export)
                      RETURN(0);
      

      Probably need to move the mdt variable assignment to after this check.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: