Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp546343rdb; Thu, 19 Oct 2023 11:35:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGdyNsbVb70sgDooc7tRqXqOqw9dVWQBxM9zeomk1LE2J4BBsbJfjwuQvgPNgIOVkV2Z5Gh X-Received: by 2002:a05:6a00:1708:b0:6b2:5d32:57d with SMTP id h8-20020a056a00170800b006b25d32057dmr4238137pfc.5.1697740503456; Thu, 19 Oct 2023 11:35:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697740503; cv=none; d=google.com; s=arc-20160816; b=Q5rGDka07AMpT/WEQYiPxQHaEwQ9JSG4EBC7hKUwNobsZ+HFcb6IwXuqgMlBuupoRm TDe/934NFgcQ8MyjhOTGveXXqm/CPUZNBath+bp0wJ+nbLGxHWB16fuh4dbb+loEI6nL 5s8euFvqNul2xMiwP7dsIq6OwOxUtzaKSEA9a1IS+QSEv1THdHkQlwpZO6WVZnwWJ+Vs 6VEdvNb4DbtXaTR/i4ppmfT43SCIzOLlYZjkl4I1XlLNU0I6bFnQofXOknC6f0/4FMlw UC42M5Qc2MxFOD8sj8gDV/hkGW9i7SDEiWzR3ijbcReebhuOw3fLYmoow8tGJlmbLMzQ hiaw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=VBbJ8dI08feifnjLRaiChQaSsmuG7t/BiV08qn9LujQ=; fh=PVcgzUWjV5LTAQsu/1PpIHGK1mzKUO2evJd7BKWOLqk=; b=lyByXzhrtRqI8VmDnqeFpcQWkUsICPsi9DC31Xh2qUWFC0O8SCzQjNxgy6EEz0B7W2 6nDYv0S+X3e5Xu6QeRyHhecd2kMgrucqnn+MisUakSqgo1tENk5u9ehcF6CR193wupmg 2qWRMiSvObwhHIBs6dutJ9pf8pNSDGcAj0J9qUMVi4XOzOxF14Gi34JNU0zHIjmFxrou WDGY0r3iRA7lJv54kSt72+donInjoN/nycq+kdE9nrIO/QJ5vMeMnSggkTgwUiXe59cQ vZ/fwHp3NjeijzkzkBuxePuLzjYNI+Fy7F6MTg4o7CAT8hdWKeg0OXFt0YDyEIUlJOXN RHeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NNLrX2w8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id q22-20020a656a96000000b005afc5ea43fdsi118487pgu.849.2023.10.19.11.35.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 11:35:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NNLrX2w8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 20ADD833938F; Thu, 19 Oct 2023 11:35:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345214AbjJSSer (ORCPT + 99 others); Thu, 19 Oct 2023 14:34:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233250AbjJSSer (ORCPT ); Thu, 19 Oct 2023 14:34:47 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7117CA for ; Thu, 19 Oct 2023 11:34:45 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BE12C433C7; Thu, 19 Oct 2023 18:34:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1697740485; bh=TKx6dkVqJNWINz/u+c4Dwx5bP37eMI5QshzqdkWaob0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NNLrX2w8Af8RLacMF4aHM8lfEw6I6mMCGNgrF5xpUFD9s5W1SKIhxknAbl+KmbMoS kn8sGiSwq+FRXfOuPZWFN/mz51WX/PBQwN5KT2w2gPb4Qm3nOfhfSn+gXdpPkBpeoJ YGIuS8X0oH+/022HGDuWhu9W03XaWK4GBhbZFypo= Date: Thu, 19 Oct 2023 20:34:41 +0200 From: "gregkh@linuxfoundation.org" To: =?iso-8859-1?B?U2FuanXhbiBHYXJj7WEs?= Jorge Cc: "morbidrsa@gmail.com" , "linux-kernel@vger.kernel.org" , "jth@kernel.org" , =?iso-8859-1?Q?Rodr=EDguez_Barbarin=2C_Jos=E9?= Javier , "yangyingliang@huawei.com" Subject: Re: [RESEND PATCH 1/1] mcb: fix error handling for different scenarios when parsing Message-ID: <2023101912-unloaded-escalate-1060@gregkh> References: <20231019141434.57971-1-jorge.sanjuangarcia@duagon.com> <20231019141434.57971-2-jorge.sanjuangarcia@duagon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231019141434.57971-2-jorge.sanjuangarcia@duagon.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 19 Oct 2023 11:35:01 -0700 (PDT) On Thu, Oct 19, 2023 at 02:15:34PM +0000, Sanju?n Garc?a, Jorge wrote: > chameleon_parse_gdd() may fail for different reasons and end up > in the err tag. Make sure we at least always free the mcb_device > allocated with mcb_alloc_dev(). > > If mcb_device_register() fails, make sure to give up the reference > in the same place the device was added. > > Fixes: 728ac3389296 ("mcb: mcb-parse: fix error handing in chameleon_parse_gdd()") > Reviewed-by: Jose Javier Rodriguez Barbarin > Signed-off-by: Jorge Sanjuan Garcia > --- > drivers/mcb/mcb-core.c | 1 + > drivers/mcb/mcb-parse.c | 2 +- > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/mcb/mcb-core.c b/drivers/mcb/mcb-core.c > index 2f23b9c3b751..f797d078978f 100644 > --- a/drivers/mcb/mcb-core.c > +++ b/drivers/mcb/mcb-core.c > @@ -247,6 +247,7 @@ int mcb_device_register(struct mcb_bus *bus, struct mcb_device *dev) > return 0; > > out: > + put_device(&dev->dev); > > return ret; > } > diff --git a/drivers/mcb/mcb-parse.c b/drivers/mcb/mcb-parse.c > index 656b6b71c768..1ae37e693de0 100644 > --- a/drivers/mcb/mcb-parse.c > +++ b/drivers/mcb/mcb-parse.c > @@ -106,7 +106,7 @@ static int chameleon_parse_gdd(struct mcb_bus *bus, > return 0; > > err: > - put_device(&mdev->dev); > + mcb_free_dev(mdev); > > return ret; > } > -- > 2.34.1 Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - You have marked a patch with a "Fixes:" tag for a commit that is in an older released kernel, yet you do not have a cc: stable line in the signed-off-by area at all, which means that the patch will not be applied to any older kernel releases. To properly fix this, please follow the documented rules in the Documentation/process/stable-kernel-rules.rst file for how to resolve this. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot