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

Fix fileset string length issue

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.10.0
    • Lustre 2.9.0
    • 3
    • 9223372036854775807

    Description

      Patch http://review.whamcloud.com/21857 added this code in nodemap_fileset_seq_write():

      	OBD_ALLOC(nm_fileset, count);
      	if (nm_fileset == NULL)
      		RETURN(-ENOMEM);
      
      	if (copy_from_user(nm_fileset, buffer, count))
      		GOTO(out, rc = -EFAULT);
      

      'count' is the length of the string to write. So it is necessary to allocate count+1 for nm_fileset in order to add a '\0' after copy_from_user().

      Attachments

        Activity

          People

            emoly.liu Emoly Liu
            sbuisson Sebastien Buisson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: