Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1241232pxa; Thu, 20 Aug 2020 06:32:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFxttfY7IbSf/vbskjDNBkWmMGKvbqiMyd339nqnQqGPmZjaNs8/yiZ9ZUF6fD/lxfRBGo X-Received: by 2002:aa7:db51:: with SMTP id n17mr2847205edt.222.1597930345946; Thu, 20 Aug 2020 06:32:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597930345; cv=none; d=google.com; s=arc-20160816; b=g0WQgt3vrr8mpSpAUZzYjyWlv09ERucBqwVQewjTmdCJ9LbNY5Xa+txQWwMRx8Dohj q87e8Tzke7HjyMv+2ihX3Oa+z4pbsyQPt4yoTn7eeeGk3b6y5TBSsjo/7CKGX+LG4ZUF pAbstTxQk1WbzK8z0yFLhGxRwuIBrHBCgLDT37srRpCOD6l5e6R/uSWxCmb0nviFDomT LXIxMxfua9PD1Bxp++BX3m0KSS37SsTZtHktROThWMb6Qt03lyhAXp/uvZvFofhKliAv pUxgQQPWXxwQISOJfQaO9/drrxmJP9jcFof5cut3g4IdnV8ERyOks3liBOIL1h9OW1Kc BfFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TE9uDSHbjEAXKsN9Qr9RHCn+OuNmUPyBNlAhOaLJT/c=; b=dmRjlfg1cuSMBwUJX1zvxMzDDS9gPLHWSIIqqWfyzlB3clZ2j1csqN1ZBW19DePN2R 8gF1klzkuN0kBmCx9CBGAJzF7KaoyGDyjodMwvznivvpGAgzb6PjmaBID/UT6oTe5pBb teVn/gkfBJ8mKn7NfpRvgyWtHQree3nt1TeWttxiJgvGK6TbWOkGNM/qDZYRUhM3I5B5 M0FC4hQqhOBU7Ln/n2ZWr0Rw7mXp3SkXMo0UE4iDxU0DsU8ZqOwxiesRpOZpB8ZHRc9G 5QXdFwlsavoHHLqxiKzwhzAhU66h4+pgKULoHv3hLKfL8W8BW9RmjhAd24g/LXq/CphS 4qrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=L+PcxT1b; 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=fail (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 z1si1151825eja.41.2020.08.20.06.32.00; Thu, 20 Aug 2020 06:32: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; dkim=pass header.i=@kernel.org header.s=default header.b=L+PcxT1b; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728820AbgHTN34 (ORCPT + 99 others); Thu, 20 Aug 2020 09:29:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:45434 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728385AbgHTJc7 (ORCPT ); Thu, 20 Aug 2020 05:32:59 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 765EE22BEA; Thu, 20 Aug 2020 09:32:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597915973; bh=ACTaPf3WB8xQMkrMtFCoSoFHetoXM3EoWgiMsXUUXhU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L+PcxT1bBYHDPhmmKOFBtm9FEflpZ7e69OYeDOJvk9OX2GPwYWjQ349I6joOBQUTs hbG/n+Wm9htNJy4B6xX4q4L/HrGMOrpgZYjCHAtT1XIdoTjYjcvMUlNyyx6KQMO/ME t3p6FIwvYywhlhNeRHH9XTcUh9rn64YHa7QwDjFc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Wang Hai , Ilya Leoshkevich , Heiko Carstens , Sasha Levin Subject: [PATCH 5.8 200/232] s390/test_unwind: fix possible memleak in test_unwind() Date: Thu, 20 Aug 2020 11:20:51 +0200 Message-Id: <20200820091622.495075224@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820091612.692383444@linuxfoundation.org> References: <20200820091612.692383444@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wang Hai [ Upstream commit 75d3e7f4769d276a056efa1cc7f08de571fc9b4b ] test_unwind() misses to call kfree(bt) in an error path. Add the missed function call to fix it. Fixes: 0610154650f1 ("s390/test_unwind: print verbose unwinding results") Reported-by: Hulk Robot Signed-off-by: Wang Hai Acked-by: Ilya Leoshkevich Signed-off-by: Heiko Carstens Signed-off-by: Sasha Levin --- arch/s390/lib/test_unwind.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/lib/test_unwind.c b/arch/s390/lib/test_unwind.c index 32b7a30b2485d..b0b12b46bc572 100644 --- a/arch/s390/lib/test_unwind.c +++ b/arch/s390/lib/test_unwind.c @@ -63,6 +63,7 @@ static noinline int test_unwind(struct task_struct *task, struct pt_regs *regs, break; if (state.reliable && !addr) { pr_err("unwind state reliable but addr is 0\n"); + kfree(bt); return -EINVAL; } sprint_symbol(sym, addr); -- 2.25.1