提交 27af86bb 编写于 作者: X Xin Long 提交者: David S. Miller

sctp: do not pr_err for the duplicated node in transport rhlist

The pr_err in sctp_hash_transport was supposed to report a sctp bug
for using rhashtable/rhlist.

The err '-EEXIST' introduced in Commit cd2b7087 ("sctp: check
duplicate node before inserting a new transport") doesn't belong
to that case.

So just return -EEXIST back without pr_err any kmsg.

Fixes: cd2b7087 ("sctp: check duplicate node before inserting a new transport")
Reported-by: NWei Chen <weichen@redhat.com>
Signed-off-by: NXin Long <lucien.xin@gmail.com>
Acked-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: NNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1b12580a
...@@ -897,15 +897,12 @@ int sctp_hash_transport(struct sctp_transport *t) ...@@ -897,15 +897,12 @@ int sctp_hash_transport(struct sctp_transport *t)
rhl_for_each_entry_rcu(transport, tmp, list, node) rhl_for_each_entry_rcu(transport, tmp, list, node)
if (transport->asoc->ep == t->asoc->ep) { if (transport->asoc->ep == t->asoc->ep) {
rcu_read_unlock(); rcu_read_unlock();
err = -EEXIST; return -EEXIST;
goto out;
} }
rcu_read_unlock(); rcu_read_unlock();
err = rhltable_insert_key(&sctp_transport_hashtable, &arg, err = rhltable_insert_key(&sctp_transport_hashtable, &arg,
&t->node, sctp_hash_params); &t->node, sctp_hash_params);
out:
if (err) if (err)
pr_err_once("insert transport fail, errno %d\n", err); pr_err_once("insert transport fail, errno %d\n", err);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册