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

double free possibility in cl_sub_dio cleanup for vectorless iterators

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • None
    • 2.15.8 ARM64 Clients
    • 3
    • 9223372036854775807

      cl_sub_dio_alloc() intentionally permits sub-DIO requests without a duplicated iterator vector. In particular, XARRAY and DISC discard iterators do not require id_vec duplication:

      /* xarray and discard do not need vec to be dup'd */
      if (!v_sz)
        goto out; 

      However, the normal completion path unconditionally frees the duplicate state:

      cl_sub_dio_end()
        -> csd_dup_free()
        -> OBD_FREE(tmp, ...) 

      csd_dup_free() currently assumes dup->id_vec is non-NULL. This triggers the OBD_FREE() assertion when completion reaches a valid vectorless sub-DIO request.The issue was exposed while running Lustre client tests on Ubuntu 24 ARM64 with Linux 6.17, but the same alloc/free mismatch exists in current lustre-master

            sonia.sh.sharma Sonia Sharma
            sonia.sh.sharma Sonia Sharma
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: