[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
Subject: LU-9289 nodemap: fix fileset string length issue
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 73071dde8c826897bc106a418821417f770dac99

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/
Subject: LU-9289 nodemap: fix fileset string length issue
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 7a32eff39c8b4bd17f173a62293374c5b4ff04e1

Comment by Peter Jones [ 03/Jun/17 ]

Landed for 2.10

Generated at Sat Feb 10 02:24:51 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.