From patchwork Mon Jan 3 16:52:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhavan T. Venkataraman" X-Patchwork-Id: 12702673 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3920BC433FE for ; Mon, 3 Jan 2022 16:54:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1TEywLRQxdMHNo9akPd84w3VRMvQY14/xPoTXN3UlGQ=; b=BdjBZAymUssauY oFF/fXU8GTokSiPNNBYcC28yKWBxeX6VQDqE5wiYFSMDxCY4E4IBWemy+1x8tySKPp9xJaaMl5O7f OZRO/raToMkqKCP4R2L+a1ztg4oS0eJKFKKQ+c7TaG/LtR6HLY+XzFdFCR8IdmAV4qw3ctYPtS2Uq cLVg0YUF/n5W+0tYjjbmaOYTNFEFgdF0xidHS8x2JRaZIKRkmuhmjwD+VrAnr20HCaMY0Lc2qf99M lAZD8Dz+tCWLRlLEHmIdly04u10X8UWlGtast2/0B5Mg3J31iaMyQc3M89EsoUPDzci0XG5MYjRb1 qb46ZLZMuAWhXrX0lSmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n4QZo-009YtT-By; Mon, 03 Jan 2022 16:52:52 +0000 Received: from linux.microsoft.com ([13.77.154.182]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n4QZj-009Yqp-B0 for linux-arm-kernel@lists.infradead.org; Mon, 03 Jan 2022 16:52:48 +0000 Received: from x64host.home (unknown [47.187.212.181]) by linux.microsoft.com (Postfix) with ESMTPSA id CE75920B717A; Mon, 3 Jan 2022 08:52:44 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com CE75920B717A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1641228765; bh=YL0/rwGfLusLcXbXJfaP6PJh5+D2PxMoErb3hzo3tiU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GDc/rmeHIUeY0VZNBUg9VQctr1fTXiY1RP9TcKim+A4HKwoeO7IpOVOYc+emp90Jt MjbIlZReiueS5r8yh0mV6DKoMdMcFU03C+PTtO5L9QKwJHIoNgLsNQVkuFO9mbOg1Y aqgiAHniikgTsfk3KTMqlhrmZWSCOrbpeGFe2m0k= From: madvenka@linux.microsoft.com To: mark.rutland@arm.com, broonie@kernel.org, jpoimboe@redhat.com, ardb@kernel.org, nobuta.keiya@fujitsu.com, sjitindarsingh@gmail.com, catalin.marinas@arm.com, will@kernel.org, jmorris@namei.org, linux-arm-kernel@lists.infradead.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, madvenka@linux.microsoft.com Subject: [PATCH v12 01/10] arm64: Remove NULL task check from unwind_frame() Date: Mon, 3 Jan 2022 10:52:03 -0600 Message-Id: <20220103165212.9303-2-madvenka@linux.microsoft.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220103165212.9303-1-madvenka@linux.microsoft.com> References: <0d0eb36f348fb5a6af6eb592c0525f6e94007328> <20220103165212.9303-1-madvenka@linux.microsoft.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220103_085247_506906_AB0D4D3F X-CRM114-Status: UNSURE ( 8.14 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: "Madhavan T. Venkataraman" Currently, there is a check for a NULL task in unwind_frame(). It is not needed since all current consumers pass a non-NULL task. Signed-off-by: Madhavan T. Venkataraman Reviewed-by: Mark Brown Reviewed-by: Mark Rutland --- arch/arm64/kernel/stacktrace.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm64/kernel/stacktrace.c b/arch/arm64/kernel/stacktrace.c index 0fb58fed54cb..5f5bb35b7b41 100644 --- a/arch/arm64/kernel/stacktrace.c +++ b/arch/arm64/kernel/stacktrace.c @@ -69,9 +69,6 @@ static int notrace unwind_frame(struct task_struct *tsk, unsigned long fp = frame->fp; struct stack_info info; - if (!tsk) - tsk = current; - /* Final frame; nothing to unwind */ if (fp == (unsigned long)task_pt_regs(tsk)->stackframe) return -ENOENT;