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

USe of unchecked ERR_PTR value from lov_sub_get

Details

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

    Description

      smatch highlighted the issue of return value from lov_sub_get() being used in lov_io_read_ahead and lov_io_fault_start.
      lov_sub_get can return ERR_PTR as it's return value, so it should be fixed.

      Example incorrect code:

              sub = lov_sub_get(env, lio, stripe);
      
              lov_stripe_offset(loo->lo_lsm, cl_offset(obj, start), stripe, &suboff);
              rc = cl_io_read_ahead(sub->sub_env, sub->sub_io,
                                    cl_index(lovsub2cl(r0->lo_sub[stripe]), suboff),
                                    ra);
      

      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: