On Fri, Nov 23, 2018 at 10:01:25AM +0100, Michal Hocko wrote: > On Fri 23-11-18 10:21:35, Dan Carpenter wrote: > > We had intended to only print dentry->d_name.len characters but there is > > a width vs precision typo so if the name isn't NUL terminated it will > > read past the end of the buffer. > > OK, it took me quite some time to grasp what you mean here. The code > works as expected because d_name.len and dname.name are in sync so there > no spacing going to happen. Anyway what you propose is formally more > correct I guess. > Yeah. If we are sure that the name has a NUL terminator then this change has no effect. regards, dan carpenter