[LU-6491] Confusing results for too long fsname Created: 24/Apr/15 Updated: 28/May/15 Resolved: 28/May/15 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.8.0 |
| Type: | Bug | Priority: | Trivial |
| Reporter: | Wang Shilong (Inactive) | Assignee: | Emoly Liu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Epic/Theme: | patch |
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
If users passed a fsname longer than 9 bytes, caller error: conf_param: Cannot allocate memory which is really unfriendly for common users. |
| Comments |
| Comment by Wang Shilong (Inactive) [ 24/Apr/15 ] |
|
I missed to migrate my google account for gerrit, but i think here should fix it. if (strlen(fsname) >= sizeof(fsdb->fsdb_name)) { CERROR("fsname %s is too long\n", fsname); - RETURN(NULL); + RETURN(ERR_PTR(-EINVAL)); } OBD_ALLOC_PTR(fsdb);
strcpy(fsdb->fsdb_name, fsname);
static void mgs_free_fsdb(struct mgs_device *mgs, struct fs_db *fsdb)
if (!test_bit(FSDB_MGS_SELF, &fsdb->fsdb_flags)) { |
| Comment by Gerrit Updater [ 24/Apr/15 ] |
|
Shilong Wang (wshilong@ddn.com) uploaded a new patch: http://review.whamcloud.com/14568 |
| Comment by Peter Jones [ 24/Apr/15 ] |
|
Emoly Could you please take care of this patch? Thanks Peter |
| Comment by Gerrit Updater [ 28/May/15 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/14568/ |
| Comment by Peter Jones [ 28/May/15 ] |
|
Landed for 2.8 |