[LU-9289] Fix fileset string length issue Created: 04/Apr/17 Updated: 03/Jun/17 Resolved: 03/Jun/17 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.9.0 |
| Fix Version/s: | Lustre 2.10.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sebastien Buisson (Inactive) | Assignee: | Emoly Liu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | nodemap | ||
| Severity: | 3 |
| Rank (Obsolete): | 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(). |
| Comments |
| Comment by Gerrit Updater [ 04/Apr/17 ] |
|
Sebastien Buisson (sbuisson@ddn.com) uploaded a new patch: https://review.whamcloud.com/26335 |
| Comment by Peter Jones [ 04/Apr/17 ] |
|
Emoly Could you please review this patch? Thanks Peter |
| Comment by Gerrit Updater [ 03/Jun/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/26335/ |
| Comment by Peter Jones [ 03/Jun/17 ] |
|
Landed for 2.10 |