Skip to content

Commit 27af86b

Browse files
lxindavem330
authored andcommitted
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 cd2b708 ("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: cd2b708 ("sctp: check duplicate node before inserting a new transport") Reported-by: Wei Chen <weichen@redhat.com> Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1b12580 commit 27af86b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

net/sctp/input.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -897,15 +897,12 @@ int sctp_hash_transport(struct sctp_transport *t)
897897
rhl_for_each_entry_rcu(transport, tmp, list, node)
898898
if (transport->asoc->ep == t->asoc->ep) {
899899
rcu_read_unlock();
900-
err = -EEXIST;
901-
goto out;
900+
return -EEXIST;
902901
}
903902
rcu_read_unlock();
904903

905904
err = rhltable_insert_key(&sctp_transport_hashtable, &arg,
906905
&t->node, sctp_hash_params);
907-
908-
out:
909906
if (err)
910907
pr_err_once("insert transport fail, errno %d\n", err);
911908

0 commit comments

Comments
 (0)