]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NTB: ntb_tool: reading the link file should not end in a NULL byte
authorLogan Gunthorpe <logang@deltatee.com>
Wed, 9 Jan 2019 19:22:26 +0000 (12:22 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:49:06 +0000 (17:49 +0200)
commit7ec040619b880c4e9caf3295f560a1c070a807b4
tree2836a9f1cd66d8716e5d98e8809e282b066ed701
parent38169a09f1e27b3cee5b57678c0bd02abf6f0eea
NTB: ntb_tool: reading the link file should not end in a NULL byte

[ Upstream commit 912e12813dd03c602e4922fc34709ec4d4380cf0 ]

When running ntb_test this warning is issued:

./ntb_test.sh: line 200: warning: command substitution: ignored null
byte in input

This is caused by the kernel returning one more byte than is necessary
when reading the link file.

Reduce the number of bytes read back to 2 as it was before the
commit that regressed this.

Fixes: 7f46c8b3a552 ("NTB: ntb_tool: Add full multi-port NTB API support")
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Acked-by: Allen Hubbe <allenbh@gmail.com>
Tested-by: Alexander Fomichev <fomichev.ru@gmail.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/ntb/test/ntb_tool.c