]> git.baikalelectronics.ru Git - kernel.git/commit
net/atm: fix proc_mpc_write incorrect return value
authorXiaobo Liu <cppcoffee@gmail.com>
Fri, 14 Oct 2022 02:05:40 +0000 (10:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 29 Oct 2022 08:20:35 +0000 (10:20 +0200)
commit598fd5d38fc275a37298711a447679a8dd2b32af
tree39973939f8db4c45b7c5a418af8b6913787a3e17
parent7b9b49c4d92221eb37a771bb654b24570be44b10
net/atm: fix proc_mpc_write incorrect return value

[ Upstream commit 2265dd14f4652e6472f0bf36e0a3a1e892b6701a ]

Then the input contains '\0' or '\n', proc_mpc_write has read them,
so the return value needs +1.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/atm/mpoa_proc.c