Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2763767ybh; Sat, 25 Jul 2020 00:31:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygSzouKxmPICO1QKbbCT0/21uzkwRMbuD8r6oeY5cHRRsg0CI5FJhpvimKlHeZI0M26YCw X-Received: by 2002:a17:906:c04d:: with SMTP id bm13mr12293547ejb.321.1595662285247; Sat, 25 Jul 2020 00:31:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595662285; cv=none; d=google.com; s=arc-20160816; b=m0vWJ2+28OU858dDnY8lAQ5Z9KY0Icq7sMjHy4GbZW/cWSFykishLK2yFdiiijTM/D xH7zCMqT8TgtVhLkaQw2yCwgttHMDDHyigyAULCUM+rlK5YW+kVu8oDkRNhe6jrbPvi9 OG9yakyY6Y05oHGTRPhW/FOHIIEnAamWHn71xQVAcatU8ArV+7kX5l5VHb6ozmjkdY2A r723Td+iIbMDy9wKZ0P31aB0oT/Hxj7aMVEf5Nt19cXKW3VO05zv5escnUxwBQ90Eq95 8ua5rD9EAfDLSVWh9QfYx2Mb+rNy9EChgpZ7VUIBMGrh27iuZy7zs8Q2lCj6WQKa71Fy RqVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=NFKiTLk4YQj4CQlqKNPWANcICm1Rabpmzh+rUQVs7dg=; b=MjJ+VgdV+oHaMfqmyBP6+vu3eJMX+kiul7DN2G22JkolSI2IMH9bmdFCxewT6+XTm1 FMJdUrSum+opHygjfi4FUXCuRp3zG/DOF8Jq1qYQqhuxQ+dQVDXpF5nVUlRCMnHxvl3f I8VcamRd5nOUh8PIEs58VslfG81PpKkrX57bORQIfG48RQhTW/fGgxUzmiTmTKjm+SmO XnvSjkDrKOtPxxwZkIGE+fsNCeXoFw/VCNbpvmwVSzxNGeQcldpCaD8Jo1lN1xh0gGR2 rAWu3fF5Oe9hOyFYvl0cl7tX+9dQTM3xqLOoRSCAx0BvhLHB4s3GQjJUqeIWuuif2Ovv rPbQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v8si712363ejc.311.2020.07.25.00.30.58; Sat, 25 Jul 2020 00:31:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726694AbgGYH3s (ORCPT + 99 others); Sat, 25 Jul 2020 03:29:48 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:43789 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726017AbgGYH3r (ORCPT ); Sat, 25 Jul 2020 03:29:47 -0400 Received: by mail-lj1-f196.google.com with SMTP id f5so12160684ljj.10 for ; Sat, 25 Jul 2020 00:29:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=NFKiTLk4YQj4CQlqKNPWANcICm1Rabpmzh+rUQVs7dg=; b=nEEo4uaxJi655H9db3UXmorToxufcurQcrOvCzWNwDlNNs2hYk5YuFpB64D9ziKQxU v//qVfTi46CkbxuDCMYdqCsd2MJoY1+FdwPOhYheI72CD3Y3JaQWa9eIFTBgCXggrhNR 49jgHYm7KqGRlfWWXhDojwcdVZftP961urzbwEeVY5VTiul4x7Q/0L4AYjg7X8YrXKZD qTdFOQDvhZvVhDcXfneNFVPfhb0GH0CUuuR1gLepIoWE+5qTYDmX14tNH1mitlgsSzn8 /i5N2xQRqIMySYiLADMg7Pz1euRxuJD04JczveNmEajL7/6knQ4m/0+947xK+g0oJvAe s+7A== X-Gm-Message-State: AOAM533mrjyQuynpZcFJ7xk6E0xyh4Cq7FPfeGQp4wPfYyrXGhRcP8C+ Jby2Q7h7vNVe6LOo9luX894= X-Received: by 2002:a2e:864b:: with SMTP id i11mr5746421ljj.64.1595662185716; Sat, 25 Jul 2020 00:29:45 -0700 (PDT) Received: from xi.terra (c-beaee455.07-184-6d6c6d4.bbcust.telenor.se. [85.228.174.190]) by smtp.gmail.com with ESMTPSA id n29sm1158278lfi.9.2020.07.25.00.29.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jul 2020 00:29:44 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.93.0.4) (envelope-from ) id 1jzEci-0008MI-7r; Sat, 25 Jul 2020 09:29:36 +0200 Date: Sat, 25 Jul 2020 09:29:36 +0200 From: Johan Hovold To: Li Heng Cc: johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org, viresh.kumar@linaro.org, greybus-dev@lists.linaro.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] svc: add missed destroy_workqueue when gb_svc_create fails Message-ID: <20200725072936.GQ3634@localhost> References: <1595646397-53868-1-git-send-email-liheng40@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1595646397-53868-1-git-send-email-liheng40@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 25, 2020 at 11:06:37AM +0800, Li Heng wrote: > destroy_workqueue() should be called to destroy svc->wq > when gb_svc_create() init resources fails. > > Fixes: 8465def499c7 ("staging: greybus: move the greybus core to drivers/greybus") > Reported-by: Hulk Robot > Signed-off-by: Li Heng > --- > drivers/greybus/svc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/greybus/svc.c b/drivers/greybus/svc.c > index ce7740e..38f858f 100644 > --- a/drivers/greybus/svc.c > +++ b/drivers/greybus/svc.c > @@ -1340,6 +1340,7 @@ struct gb_svc *gb_svc_create(struct gb_host_device *hd) > > err_put_device: > put_device(&svc->dev); > + destroy_workqueue(svc->wq); Your bot is broken; the workqueue is released in gb_svc_release(). And please fix your internal review process so that you catch things like this before posting. > return NULL; > } Johan