Received: by 10.223.185.116 with SMTP id b49csp5488747wrg; Wed, 7 Mar 2018 12:39:23 -0800 (PST) X-Google-Smtp-Source: AG47ELthWchPY3RGTUgE3AL30xjyViquXoUQwLaalsEeYIq3o4jA6iFG9J0p8r9HCWqkncD9Oamc X-Received: by 2002:a17:902:b416:: with SMTP id x22-v6mr21356611plr.279.1520455163674; Wed, 07 Mar 2018 12:39:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520455163; cv=none; d=google.com; s=arc-20160816; b=Kdgv1iPykHEdpSBpDhyqIdQrTVMnwdDF+GhXii+wSF9GPb6hWX2QUPqkhyaC09hdU4 lxbW0sxPp1cHN61a7NgukQ2b/Rb8Tpj+Z2CFCGc062+tsMjPL5DGuoUGty/fH5nU3XBA YpJ4RQcXx6w8sBjfZ77jtzS3vxTafyY/czp/5KyNQvJv/xZajpn1g78XafW0FzdTvHlc hGlArjp9nEjGqVrtRiLAPy2QrjN0YzUN8/dFS78qjVwu8gIgUsQqiHHWaOTvvvYDeodr HqFqVbmfK4W7Y/Rrd9I5GtUvnIeQ5RU+ZfK4fKfy5lSsM4GxEJEsFsVF3uwIN/soEHMY ze5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Ooi9XxpbdQlJUnOToUPh+/M1t8nIYxyF4mZ5B33Vp5o=; b=zxrk6kSXcGvHyC/pvQnGPhMhL4bjuTeTHwbmfha+ZQZ/Bco1igas/d3m8TiSb414Tl o8Tq69Bsz5v3/bnydrSP5iQG5E8DXwZAD0kJDFLSgx5FOrOPryEg25CZ0zO+TLv1CLeO nWgHwD16vSOegWF1O3Jy8DrRv1tK2whpl/2UADg1jv9onn6Sf1vcB1wfGNn+rAMvzpy8 flFcuS2I2DeIIfpcVTlNXYs1hT3e16I7I4zlWjZfw4XNQcINFdRjolsnvyVxT47AOgsm xCUKRq81O1juRwSn4Wda3jgtoHQLSMNXQW7fObuuT6qgjAHsg3hCGjHM4FyD4zTadOqk HTXQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b10si11862629pgf.613.2018.03.07.12.39.08; Wed, 07 Mar 2018 12:39:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754821AbeCGTlx (ORCPT + 99 others); Wed, 7 Mar 2018 14:41:53 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:41352 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934671AbeCGTlv (ORCPT ); Wed, 7 Mar 2018 14:41:51 -0500 Received: from localhost (unknown [185.236.200.248]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 068351011; Wed, 7 Mar 2018 19:41:50 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wei Chen , Xin Long , Marcelo Ricardo Leitner , Neil Horman , "David S. Miller" Subject: [PATCH 4.15 064/122] sctp: do not pr_err for the duplicated node in transport rhlist Date: Wed, 7 Mar 2018 11:37:56 -0800 Message-Id: <20180307191738.614979882@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180307191729.190879024@linuxfoundation.org> References: <20180307191729.190879024@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Xin Long [ Upstream commit 27af86bb038d9c8b8066cd17854ddaf2ea92bce1 ] The pr_err in sctp_hash_transport was supposed to report a sctp bug for using rhashtable/rhlist. The err '-EEXIST' introduced in Commit cd2b70875058 ("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: cd2b70875058 ("sctp: check duplicate node before inserting a new transport") Reported-by: Wei Chen Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/sctp/input.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/net/sctp/input.c +++ b/net/sctp/input.c @@ -897,15 +897,12 @@ int sctp_hash_transport(struct sctp_tran rhl_for_each_entry_rcu(transport, tmp, list, node) if (transport->asoc->ep == t->asoc->ep) { rcu_read_unlock(); - err = -EEXIST; - goto out; + return -EEXIST; } rcu_read_unlock(); err = rhltable_insert_key(&sctp_transport_hashtable, &arg, &t->node, sctp_hash_params); - -out: if (err) pr_err_once("insert transport fail, errno %d\n", err);