Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1668618rwd; Thu, 15 Jun 2023 13:59:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7w5Je5cmFZxLDfp/W80N81jJ8CmS7SauExlv1FZKSS/x4AWKjukYQ+eoXWGoScLj2grXCm X-Received: by 2002:a05:6a20:4403:b0:100:efa1:eab0 with SMTP id ce3-20020a056a20440300b00100efa1eab0mr849418pzb.2.1686862750559; Thu, 15 Jun 2023 13:59:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686862750; cv=none; d=google.com; s=arc-20160816; b=d3XVDhRp4NJEKz0Au5kPnFw6hULPCZhaK1UpLfbos/GrzoGLdT3dTJgCsqFgGXFbot aKydNNs7/ruDII6s1GnYsd4UfGNN8BUwRYyIQ/5btEbq+TDkY1gCJCISAIRf3RHETjbT YccGBr3A83llfzwFcPcQsXIV/cpbAC0D9EfGbIMY7vJR1MPONkqVeesdop43f8P+/gdi 5dGmo30udJTbzeHkwYEqLVKtGzw2b1MwnG7ua1eG9ejj4XjXcWaT+pbia9bJCxlGEh1Q d5pOorsneGZmo7KPFQXA95mW2Fgh9HETkb6F44AIQeA243NRY1LRtn0ETGhuNaVr3/W0 Ifew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=NIlLjmpeTXD7muPq78fDDjTK7R0iuY0NQ7klt7QevyE=; b=kmoNxulCoS/oe3dNX+BLrShX3ZSJb7GWPLm6BZT6s+uRQzPt+LOFFQxnll5XHLpCU1 J05bN4hENfRmntvcaexjDjr948NvHezAbpQtwfDryyv5kwpEQi3mFRj3nrhVgyGG8Smd kFEwsSy/YMLdgEt55uqu2wTJYq3xPJXbPy2yNuFCqD9ZWuS/s2CZi7EqnwNDqTHRZ65i saSmfmRxtSvOKh7xVO4FvThTp8Nqqu/nhWbNAOdSEm87qPIf2dushuraCn2fw1MwPiE1 bsl+79PnhVFzZ2tf9xefFKjjSpH+NSMFhCl/L5TIa17Pdi9PGUqUM/g7RjAvuMSVvwUZ dG9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=svC2+czA; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m9-20020a654389000000b0054157c06b5fsi13784874pgp.258.2023.06.15.13.58.58; Thu, 15 Jun 2023 13:59:10 -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=@gmail.com header.s=20221208 header.b=svC2+czA; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229762AbjFOUg5 (ORCPT + 99 others); Thu, 15 Jun 2023 16:36:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbjFOUgz (ORCPT ); Thu, 15 Jun 2023 16:36:55 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 867BFDF; Thu, 15 Jun 2023 13:36:54 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-9828a7a39d1so239317366b.0; Thu, 15 Jun 2023 13:36:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686861413; x=1689453413; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=NIlLjmpeTXD7muPq78fDDjTK7R0iuY0NQ7klt7QevyE=; b=svC2+czAPQw0JJaaeyX18v0M77T5jLqxpdGZiELyrOr36OeF39seF6G8xChaR4LQkt EuhHsWI+ijwMx7e8w9e3twuFgSAsnOWIfPPrfb5ou5T6c0IzK1Lr5K8ufhPNMMt5SoEw ogW+7B9SntyqbpWlv8W8AjezAxrxDWq1BB+pugH9MENC4zAqJfRV43WH5WjrlD5+5Nwx /5Vc+xe35iSLWT6WPqm044DLSMrTgQxLyulyv28+Bw8qNZsF0TSzS/T1sYXozW+g/yBW etqSP1QNjSrihZ9N2NOOfspAXWMRbN3xfF3x0wiXkJ+veQ12KTfUZ9VuNX5NOd45gMtC oB/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686861413; x=1689453413; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=NIlLjmpeTXD7muPq78fDDjTK7R0iuY0NQ7klt7QevyE=; b=RlgWJaOZsjowFMrggpfPTGGNL25uE168RjiWhBMFKG8baH9hzemSYdy6EYRG2XhG5b U87knYqnssjbGs3yONuPm16IZA5/vHmDNgtnTDwVQ0s10qKlptHBaHdni4AYCQZfnEtW LdgCF3AvvOJasExU3BCxojysFdMSRa7jTewufSS3JBFvCvizQ+sE3JufCCz3pQJHuott dnzXuyef/IYzu+QdvH7Yytl1xdFyisHG6xAaGi5f9fNBh2vQNZVNhx/iDRQneFB2xRX9 JhlvZzzNcXwYoJ34HvyUrfJegXbE3xeo0OHoGelrKY3Add1MAx1xQ+QqEHtt13ZoiSdh itDA== X-Gm-Message-State: AC+VfDw8fFCSc1Vc8DXzgswy07drpEyMTElmM7EdOB+tKmgGaiSxqEeW cK5HPez+o/rwK8AL/WtfKe0= X-Received: by 2002:a17:906:ef0b:b0:967:21:5887 with SMTP id f11-20020a170906ef0b00b0096700215887mr145397ejs.40.1686861412620; Thu, 15 Jun 2023 13:36:52 -0700 (PDT) Received: from skbuf ([188.27.184.189]) by smtp.gmail.com with ESMTPSA id oq19-20020a170906cc9300b00977e0bcff1esm9917887ejb.10.2023.06.15.13.36.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 13:36:51 -0700 (PDT) Date: Thu, 15 Jun 2023 23:36:49 +0300 From: Vladimir Oltean To: Simon Horman Cc: Wang Ming , Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Stephen Rothwell , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, opensource.kernel@vivo.com Subject: Re: [PATCH v1] drivers:net:dsa:Fix resource leaks in fwnode_for_each_child_node() loops Message-ID: <20230615203649.amziv2aqzi3vishu@skbuf> References: <20230615070512.6634-1-machel@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Hi Simon, On Thu, Jun 15, 2023 at 03:03:15PM +0200, Simon Horman wrote: > On Thu, Jun 15, 2023 at 03:04:58PM +0800, Wang Ming wrote: > > The fwnode_for_each_child_node loop in qca8k_setup_led_ctrl should > > have fwnode_handle_put() before return which could avoid resource leaks. > > This patch could fix this bug. > > > > Signed-off-by: Wang Ming > > Hi Wang Ming, > > unfortunately your patch has been whitespace mangled - tabs have been > converted into 8 spaces. Possibly this was done by your mail client > or mail server. In any case the result is that the patch doesn't apply. > And unfortunately that breaks our processes. > > Also, I'm assuming that as this patch is a fix, it is targeted at the > "net", as opposed to "net-next", tree. This should be noted in the subject. > > Subject: [PATCH net v2] ... > > Lastly, looking at the git history of qca8k-leds.c, I think that > a better prefix for the patch is "net: dsa: qca8k: ". > > Subject: [PATCH net v2] net: dsa: qca8k: ... > > Please consider addressing the problems and reposting your patch. > > -- > pw-bot: changes-requested I think that according to the disclaimer text, you as a subscriber to the mailing list should have deleted this message instead of commenting on it :) | The contents of this message and any attachments may contain confidential | and/or privileged information and are intended exclusively for the | addressee(s). If you are not the intended recipient of this message or | their agent, please note that any use, dissemination, copying, or storage | of this message or its attachments is not allowed. | If you receive this message in error, please notify the sender by reply | the message or phone and delete this message, any attachments and any | copies immediately. Seriously now, that has to go when posting to a mailing list whose archives can be seen on the world wide web. https://lore.kernel.org/netdev/20230615070512.6634-1-machel@vivo.com/ 2 comments from my side on the actual patch. 1. There is an indentation of 1 space in the commit message which doesn't belong there. 2. I believe that the "ports" fwnode_handle is also leaked, both in the error as well as in the success case. And one more process-related observation. You must find the commit which introduced the problem and add: Fixes: 1e264f9d2918 ("net: dsa: qca8k: add LEDs basic support") and also CC the author of that patch.