提交 fcd12a85 编写于 作者: Z Zhengchao Shao 提交者: sanglipeng

net: caif: fix double disconnect client in chnl_net_open()

stable inclusion
from stable-v5.10.156
commit 389738f5dbc51f36ce735ee327f6d143b735a95f
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7MCG1

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

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

[ Upstream commit 8fbb53c8 ]

When connecting to client timeout, disconnect client for twice in
chnl_net_open(). Remove one. Compile tested only.

Fixes: 2aa40aef ("caif: Use link layer MTU instead of fixed MTU")
Signed-off-by: NZhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: Nsanglipeng <sanglipeng1@jd.com>
上级 1c5ba5a9
......@@ -315,9 +315,6 @@ static int chnl_net_open(struct net_device *dev)
if (result == 0) {
pr_debug("connect timeout\n");
caif_disconnect_client(dev_net(dev), &priv->chnl);
priv->state = CAIF_DISCONNECTED;
pr_debug("state disconnected\n");
result = -ETIMEDOUT;
goto error;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册