diff options
| author | Darrick J. Wong <[email protected]> | 2023-02-10 17:06:06 +0000 |
|---|---|---|
| committer | Darrick J. Wong <[email protected]> | 2023-02-10 17:06:06 +0000 |
| commit | dd07bb8b6baf2389caff221f043d9188ce6bab8c (patch) | |
| tree | fd1206f2a1e7849ea19b68eef376a2f03c71d504 /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
| parent | xfs: make kobj_type structures constant (diff) | |
| download | kernel-dd07bb8b6baf2389caff221f043d9188ce6bab8c.tar.gz kernel-dd07bb8b6baf2389caff221f043d9188ce6bab8c.zip | |
xfs: revert commit 8954c44ff477
The name passed into __xfs_xattr_put_listent is exactly namelen bytes
long and not null-terminated. Passing namelen+1 to the strscpy function
strscpy(offset, (char *)name, namelen + 1);
is therefore wrong. Go back to the old code, which works fine because
strncpy won't find a null in @name and stops after namelen bytes. It
really could be a memcpy call, but it worked for years.
Reported-by: [email protected]
Fixes: 8954c44ff477 ("xfs: use strscpy() to instead of strncpy()")
Signed-off-by: Darrick J. Wong <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
0 files changed, 0 insertions, 0 deletions
