[LU-6667] ll_getname allocates too big of a buffer Created: 31/May/15  Updated: 31/Aug/15  Resolved: 31/Aug/15

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.8.0

Type: Bug Priority: Minor
Reporter: Oleg Drokin Assignee: WC Triage
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

__getname used in ll_getname allocated PATH_MAX sized 4k buffer that is overkill.
In fact we only need a single component of the pathname that could not be longer than 255 bytes, so only allocating 256 bytes should be enough.
Additionally need to check for strncpy_from_user negative return values while at that.



 Comments   
Comment by Gerrit Updater [ 31/May/15 ]

Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: http://review.whamcloud.com/15089
Subject: LU-6667 llite: improve ll_getname
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: aecf61fc4c4068636c815a7d50e8b76352a77d08

Comment by Gerrit Updater [ 29/Aug/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/15089/
Subject: LU-6667 llite: improve ll_getname
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 051c25bbcd298b9f8fbbc478d968aeb9963b663f

Comment by Joseph Gmitter (Inactive) [ 31/Aug/15 ]

Landed for 2.8.

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