Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1982182pxb; Thu, 16 Sep 2021 22:21:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyys17zlC8D6iT7sXzUI4L8WbXOLR7UGo+R/7xCs3ZzcYqxogu6AaM1QKSRx1TOYXxwHViN X-Received: by 2002:a50:ce44:: with SMTP id k4mr10298209edj.375.1631856105363; Thu, 16 Sep 2021 22:21:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631856105; cv=none; d=google.com; s=arc-20160816; b=h3DizXhS0HNfBpP6nSA7WSI99IcNaglh/qOCSNpkgRppAlOfSZhgGM7dfininaIllt 1HoFiTbpxITpN7QU+qYVrrROj2cDYYie5K/P3/aLZOzETJkN5yw+dnj1ZAZ0YihSjsVY TN2M2rkIStCdrNHiBnM3hClYh90tiozLmEAzOeZa3oV/qLV6/t33vT7SrnyGyNASjBII d/d6tCtA8MS56aTTuCxOLiReMCGi5iKvkFe2jUk2cmA+p44pCr/PGjF80/+jiNu4VieZ hzp+l/okrCcEx5HkqDjH7hLpM12FrvOxZ7WwQEX62xn4DceOVWSBnlz7ubG0o1/x+TZY KjZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=i8rU7RvQwd7pvlWv9XjxxCaFDoFTGBZxp7FIdA1cT38=; b=N2ngn0RBwu7Gp8ECKGO2jkDbpD25+sUljI+Bx//I/q04irkwc7zfRXeOvTLMnre+mr /cEhS4klACSbPbO7fo47xLcEf4lgMGxoZr1zxb8nBYih58Yy95dfWJxf73/j11RmvDnB gL2z6ABKBtRXG/+3oMcAAr4FEEVoXCovPMctMaPzg5UKiK/sNmVoqMDuNxfb/FcQ+POZ TAv3cRonYuum3dpheny0L2TP5DwERspnH/E27Q+2yMFCycDrwEZvZopVJ+c20eXszsO2 TYo5Dy+2D48UPv6MNYe1aXUm4QTvyua775JCN1AridoGeJ4DDOLyzF/k2NPzEuuZXUL5 r1NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=so6SOQWK; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e1si7264986edl.348.2021.09.16.22.21.19; Thu, 16 Sep 2021 22:21:45 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=so6SOQWK; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356807AbhIPRuw (ORCPT + 99 others); Thu, 16 Sep 2021 13:50:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:57130 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355672AbhIPRl6 (ORCPT ); Thu, 16 Sep 2021 13:41:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F111763264; Thu, 16 Sep 2021 16:53:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631811236; bh=wvv6VEjVnDkbYBwoKIDwcJZaj2kf3bkYzQSmU93wabg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=so6SOQWK6XpjyiwSML3PmTbW98NIJNTEk7kpsuXZwELafsIT1YccMTag/Dx+9KHVo AdNjGqHoVMR6wflzoFC6n/iWUY8E/ytejr0ZuR5nGnKJ2oRjHbGAoqsPo/5x1Fcx72 fAO3v/xQbIQEDC0ttJ9zhwPwR32scRLwdRru/zHM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Daniel Bristot de Oliveira , "Qiang.Zhang" , "Steven Rostedt (VMware)" Subject: [PATCH 5.14 432/432] tracing/osnoise: Fix missed cpus_read_unlock() in start_per_cpu_kthreads() Date: Thu, 16 Sep 2021 18:03:01 +0200 Message-Id: <20210916155825.490889167@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155810.813340753@linuxfoundation.org> References: <20210916155810.813340753@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qiang.Zhang commit 4b6b08f2e45edda4c067ac40833e3c1f84383c0b upstream. When start_kthread() return error, the cpus_read_unlock() need to be called. Link: https://lkml.kernel.org/r/20210831022919.27630-1-qiang.zhang@windriver.com Cc: Fixes: c8895e271f79 ("trace/osnoise: Support hotplug operations") Acked-by: Daniel Bristot de Oliveira Signed-off-by: Qiang.Zhang Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Greg Kroah-Hartman --- kernel/trace/trace_osnoise.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/kernel/trace/trace_osnoise.c +++ b/kernel/trace/trace_osnoise.c @@ -1548,7 +1548,7 @@ static int start_kthread(unsigned int cp static int start_per_cpu_kthreads(struct trace_array *tr) { struct cpumask *current_mask = &save_cpumask; - int retval; + int retval = 0; int cpu; get_online_cpus(); @@ -1568,13 +1568,13 @@ static int start_per_cpu_kthreads(struct retval = start_kthread(cpu); if (retval) { stop_per_cpu_kthreads(); - return retval; + break; } } put_online_cpus(); - return 0; + return retval; } #ifdef CONFIG_HOTPLUG_CPU