From patchwork Mon Feb 28 17:24:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 547211 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9E5CC433EF for ; Mon, 28 Feb 2022 17:30:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237129AbiB1RbR (ORCPT ); Mon, 28 Feb 2022 12:31:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235581AbiB1Ral (ORCPT ); Mon, 28 Feb 2022 12:30:41 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8B0275C07; Mon, 28 Feb 2022 09:28:25 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 52AD961366; Mon, 28 Feb 2022 17:28:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67D42C340E7; Mon, 28 Feb 2022 17:28:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646069304; bh=n1C6owpLgNwjx+El9E0AT/7N/2KvJH9zm209lQ/YAnM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fSTsV0WQhPaZXXabtlzr+SVMd+y72ORQuMv6J1IoRqjltdF9YrREJDumvLEd3QuuL oozuxAZo2fx+bbe5yYPXw0zhTC+mfSUc5rL2q+by6Gftx9DKI8INqqMwhOztkWa+JB 7DCXjVkZM3N/4FPuG++G15KXUbYY6N7i2som/IUw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jakub Kicinski , Xin Long Subject: [PATCH 4.14 08/31] ping: remove pr_err from ping_lookup Date: Mon, 28 Feb 2022 18:24:04 +0100 Message-Id: <20220228172200.673878080@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220228172159.515152296@linuxfoundation.org> References: <20220228172159.515152296@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Xin Long commit cd33bdcbead882c2e58fdb4a54a7bd75b610a452 upstream. As Jakub noticed, prints should be avoided on the datapath. Also, as packets would never come to the else branch in ping_lookup(), remove pr_err() from ping_lookup(). Fixes: 35a79e64de29 ("ping: fix the dif and sdif check in ping_lookup") Reported-by: Jakub Kicinski Signed-off-by: Xin Long Link: https://lore.kernel.org/r/1ef3f2fcd31bd681a193b1fcf235eee1603819bd.1645674068.git.lucien.xin@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/ipv4/ping.c | 1 - 1 file changed, 1 deletion(-) --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c @@ -192,7 +192,6 @@ static struct sock *ping_lookup(struct n (int)ident, &ipv6_hdr(skb)->daddr, dif); #endif } else { - pr_err("ping: protocol(%x) is not supported\n", ntohs(skb->protocol)); return NULL; }