]> git.ipfire.org Git - thirdparty/linux.git/commit
pds_core: ensure null-termination for firmware version strings
authorNikhil P. Rao <nikhil.rao@amd.com>
Wed, 20 May 2026 20:58:42 +0000 (20:58 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 21 May 2026 15:21:11 +0000 (08:21 -0700)
commit3d4432d34c1992701289cbe12df9fd024f315998
treeb521687feed6837a7218394c32f1863141ca1c9f
parent985d4a55e64e43bd86eeb896b81ceba453301989
pds_core: ensure null-termination for firmware version strings

The driver passes fw_version directly to devlink_info_version_stored_put()
without ensuring null-termination. While current firmware null-terminates
these strings, the driver should not rely on this behavior. Add explicit
null-termination to prevent potential issues if firmware behavior changes.

Fixes: 45d76f492938 ("pds_core: set up device and adminq")
Signed-off-by: Nikhil P. Rao <nikhil.rao@amd.com>
Link: https://patch.msgid.link/20260520205842.1486718-1-nikhil.rao@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/amd/pds_core/devlink.c