Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6009883rwp; Mon, 17 Jul 2023 13:14:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlF2soWVO8I82da75iS00R6gwgXP9UG7n8y5qQ9p1J/z+N+2dIiFt4rfhvE++zxBJZz5Xf/K X-Received: by 2002:a05:6a20:7d90:b0:11d:8a8f:655d with SMTP id v16-20020a056a207d9000b0011d8a8f655dmr17543800pzj.4.1689624853265; Mon, 17 Jul 2023 13:14:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689624853; cv=none; d=google.com; s=arc-20160816; b=fCdTxpJHtT8wKR8IIfiqg6Ac/4bvLGA3XkqptiGoTE6gja4M0BA9QOwb3W3OHzwZ3T NZR1b65fJBU4Vry7j30qXOdcdL+YqgEcrHgvUHl6orV2alpvbLm9sK8BiIpDGJg+Aour wB9W7GJ569XfAymh6bSylSQbIs0AWRXnIg4goNa3Fd28s7xRc77oiTFsUDjSu14cMSmV zSLsYNDQdv3R7LWL9qcEWinm+D6RCHjJ/Bpk8cK2v6bEsmOEJO6a1YnBazzqIUoRRVkp OoZpb+NHlHjkAPuT0ms+RMwNOGUvZzRAnqnKk2zE9+ij5v3LQvcXL+vp0WtiGhD/re4d /wqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:comments :references:in-reply-to:subject:cc:to:from:dkim-signature; bh=RsZ80vHPsv7p3WHvik8ahbpar4KBJIeZVzI7m9eLzKg=; fh=JhPoBTYXC+dKIupqvRFty0+RgaaN97VEbqJyyEDiHPw=; b=uLGgenIjCWh/iuCljgP4Ri6YRxsoPzTSoIzvTrteno6noR9wUf7876oUTCZVyO7W4L kFRQTXMsiUhYdamw0y1zR1X+Y5Srka+L0iSiEOACl82Ahitjnqkpzo5hd3v3IK9yu0vv txi+lcIGCNHXqdZgAWCnj2YFklMaX0/7XjrSEvc6F9TvBCHzJZ6JAjfRd6RUXGgthyQp eiQke4pF5lZakmmXFryI1PVjjHgdu+90S8vhf9sxshHU+3qVLoaZqQH+9g9grVwNcQau I9rl0/ojqOU2xYEDtI7Y/7mX3XjebozOHTVZzs5m3h5cSJ+Zb/ynAxrt5J/urYBFtlCw z8GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=qET+yTpG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t2-20020a63eb02000000b0055bef96853bsi303448pgh.665.2023.07.17.13.14.00; Mon, 17 Jul 2023 13:14:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=qET+yTpG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231251AbjGQTzx (ORCPT + 99 others); Mon, 17 Jul 2023 15:55:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231532AbjGQTzr (ORCPT ); Mon, 17 Jul 2023 15:55:47 -0400 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 136A3172C for ; Mon, 17 Jul 2023 12:55:22 -0700 (PDT) Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 758363F187 for ; Mon, 17 Jul 2023 19:55:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1689623715; bh=RsZ80vHPsv7p3WHvik8ahbpar4KBJIeZVzI7m9eLzKg=; h=From:To:cc:Subject:In-reply-to:References:MIME-Version: Content-Type:Date:Message-ID; b=qET+yTpGKvB2qsQkg4N8fVuj8Hcu6Jf16Px0dM1+23RaoTt+5Oo1mM8d2J+rUp56F LJopvwukFjGARQD3yNYR1gL9MH8esBYD2DspOCp07ebl6ygmDAi1QVZFqKbU2Fnpy0 zr9/WIfVS3lX8+2t3gls4XDx2u6m+kDnHWEcCpkngi5ae27kbG3fbZBfI5i+Z5fEAo zqIzZoVAaUjhN0W/oxrVT7QSpL008NAuAWAJ0G/m77Y8kuTDTmuandLaqsn3o/B605 M2aDhAX4gaWaVOxcxMe57j61NbkXK/CcKBeaHdGSnvz87579OiqZHChH78InYVsx0W xV1D2El/N6njQ== Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-1b8b310553bso38111425ad.3 for ; Mon, 17 Jul 2023 12:55:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689623714; x=1692215714; h=message-id:date:content-id:mime-version:comments:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RsZ80vHPsv7p3WHvik8ahbpar4KBJIeZVzI7m9eLzKg=; b=BCNBmUwuhU+bFw93HLgZlC735T3J291702HsIsK1dFreyTewbQ4p8L1cKVoFOWp7M3 BYqaYf3y813LrZP+oE3fQZxMzAQvmoO88puzEfCvZwBVYJ6XjxwdMtMilFkFNCg/wgI7 LWNQGniufzGY8aibdq9m4Fy33oZg6h3N5tAkz14gk6ts7AprGNh+eo9cHkm0qgn/t7xv al/qGiqbnpqy/aWqfQ6B4oa0rkz/5kZ3mQLb1a9DzC2SWXMJb6qW/qkQTDhAzG4YDRVU AEt6q2bnrU16NxSzgYRJyXaykR+OmqosRxXzRbKEH9LZlC96o3QcrEukIyedI8covOkM CjQw== X-Gm-Message-State: ABy/qLaD3D4/BNoDufgen7rTlHWzkylqqsbU1c7e+k57jTjRVhorvLwD lrqnhdgezHkmoMnIeaFdk24VOW47DzFVLEv2HN7BO0pWwb10QttBiqncCHRgO35hqO2+A8Mp491 tQI+7Vm8oocl/9L54Gi/MkmyfSvB8jtpyi53Kb0KlTw== X-Received: by 2002:a17:902:6b4c:b0:1b8:400a:48f2 with SMTP id g12-20020a1709026b4c00b001b8400a48f2mr11658316plt.62.1689623713986; Mon, 17 Jul 2023 12:55:13 -0700 (PDT) X-Received: by 2002:a17:902:6b4c:b0:1b8:400a:48f2 with SMTP id g12-20020a1709026b4c00b001b8400a48f2mr11658306plt.62.1689623713638; Mon, 17 Jul 2023 12:55:13 -0700 (PDT) Received: from famine.localdomain ([50.125.80.253]) by smtp.gmail.com with ESMTPSA id w21-20020a170902a71500b001b9c5e0393csm238801plq.225.2023.07.17.12.55.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jul 2023 12:55:13 -0700 (PDT) Received: by famine.localdomain (Postfix, from userid 1000) id CB87160283; Mon, 17 Jul 2023 12:55:12 -0700 (PDT) Received: from famine (localhost [127.0.0.1]) by famine.localdomain (Postfix) with ESMTP id C5C689FABB; Mon, 17 Jul 2023 12:55:12 -0700 (PDT) From: Jay Vosburgh To: Tariq Toukan cc: Wang Ming , Andy Gospodarek , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Yufeng Mo , Guangbin Huang , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, opensource.kernel@vivo.com, Tariq Toukan Subject: Re: [PATCH net v3] net: bonding: Fix error checking for debugfs_create_dir() In-reply-to: <1051f5ae-82de-2e52-64f5-545fa2dedff9@gmail.com> References: <20230717085313.17188-1-machel@vivo.com> <1051f5ae-82de-2e52-64f5-545fa2dedff9@gmail.com> Comments: In-reply-to Tariq Toukan message dated "Mon, 17 Jul 2023 21:36:58 +0300." X-Mailer: MH-E 8.6+git; nmh 1.6; Emacs 29.0.50 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2412.1689623712.1@famine> Date: Mon, 17 Jul 2023 12:55:12 -0700 Message-ID: <2413.1689623712@famine> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tariq Toukan wrote: >On 17/07/2023 11:53, Wang Ming wrote: >> The debugfs_create_dir() function returns error pointers, >> it never returns NULL. Most incorrect error checks were fixed, >> but the one in bond_create_debugfs() was forgotten. >> Fixes: 52333512701b ("net: bonding: remove unnecessary braces") > >It's not this commit to blame... >Issue was there in first place, starting in commit f073c7ca29a4 ("bonding: >add the debugfs facility to the bonding driver"). Agreed; please upate the Fixes: commit and resubmit, thanks. -J > >> Signed-off-by: Wang Ming >> --- >> drivers/net/bonding/bond_debugfs.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> diff --git a/drivers/net/bonding/bond_debugfs.c >> b/drivers/net/bonding/bond_debugfs.c >> index 594094526648..d4a82f276e87 100644 >> --- a/drivers/net/bonding/bond_debugfs.c >> +++ b/drivers/net/bonding/bond_debugfs.c >> @@ -88,7 +88,7 @@ void bond_create_debugfs(void) >> { >> bonding_debug_root = debugfs_create_dir("bonding", NULL); >> - if (!bonding_debug_root) >> + if (IS_ERR(bonding_debug_root)) >> pr_warn("Warning: Cannot create bonding directory in debugfs\n"); >> } >> --- -Jay Vosburgh, jay.vosburgh@canonical.com