Commit 281a9585 authored by Xiaobo Liu's avatar Xiaobo Liu Committed by Lipeng Sang
Browse files

net/atm: fix proc_mpc_write incorrect return value

stable inclusion
from stable-v5.10.152
commit 118f412bedc5843032d65f41eb4e635a830c2fa8
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I73HJ0

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=118f412bedc5843032d65f41eb4e635a830c2fa8



--------------------------------

[ Upstream commit d8bde3bf ]

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

Fixes: 1da177e4 ("Linux-2.6.12-rc2")
Signed-off-by: default avatarXiaobo Liu <cppcoffee@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarLipeng Sang <sanglipeng1@jd.com>
parent 9dde705b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment