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

dt_locate_at reference leak

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • Lustre 2.12.0
    • Lustre 2.9.0, Lustre 2.10.0, Lustre 2.11.0
    • None
    • any. Test from LU-9699
    • 3
    • 9223372036854775807

      commit f6d6a552398eb1e65857d9bf1afaaf98c8dc1a79 have rewrite a dt_locate_at function to different device tree handling, and this change introduce an object reference leak.

      +       struct lu_object *lo, *n;
      +       ENTRY;
      +
      +       lo = lu_object_find_at(env, top_dev, fid, NULL);
      +       if (IS_ERR(lo))
      +               return (void *)lo;
      +
      +       LASSERT(lo != NULL);
      +
      +       cfs_list_for_each_entry(n, &lo->lo_header->loh_layers, lo_linkage) {
      +               if (n->lo_dev == &dev->dd_lu_dev)
      +                       return container_of0(n, struct dt_object, do_lu);
      +       }
      +       return ERR_PTR(-ENOENT);
      

      if some object not in expected tree we have return an ENOENT without an object reference release. It will cause a panic on unmount.

            wc-triage WC Triage
            shadow Alexey Lyashkov
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: