octeontx2-af: Fix an off by one in rvu_dbg_qsize_write()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 19 Feb 2021 09:56:32 +0000 (12:56 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:38:17 +0000 (11:38 +0100)
commitdae49384d0d7695540e2d75168f323cef1384810
tree67f7d610357deb56378f57f2fdaff27ec0c0c4bc
parenta8afe8bce4345412f105f371e6d32db5d03d99d3
octeontx2-af: Fix an off by one in rvu_dbg_qsize_write()

[ Upstream commit 3a2eb515d1367c0f667b76089a6e727279c688b8 ]

This code does not allocate enough memory for the NUL terminator so it
ends up putting it one character beyond the end of the buffer.

Fixes: 8756828a8148 ("octeontx2-af: Add NPA aura and pool contexts to debugfs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c