From patchwork Mon Jan 17 14:55:58 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: 12715501 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 40727C433F5 for ; Mon, 17 Jan 2022 14:57:53 +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=w02uzxZCXrMA3TL20d++8bAfn9ZcoHdlPVLfl6PvO8M=; b=wBYkbwLleA9FVM P4gRAPYEGBDT+qU7zj/bjs49rEmGFvSaAzr8M1+bdw7zjGil9giI5hhK5WOkDrVfZsnm28/zrSSrF FXzqS+ji+YtvifvBvwn6ATOXiiOwcI3/SVIKA5sEP7Nduuq29invYsBZdfzavUI9gvP7OxA6AQn1f aIgN4kSE9q4BxDcRzSzkpOXGiv0YZImmTCKnBYDC1XWm5+eK5qCQnx5Doa9Zv27G6E+slFpAmI31Z 0G/oboahcZe3bzAFtmKbbcJrvSyt7ot7ohtQzaa6YhXHmHnq3GxYdEP/PwGtNkQURHMGMXWhiuO6E uxrywhJe/8qleZNySMvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9TQv-00FGLt-32; Mon, 17 Jan 2022 14:56:33 +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 1n9TQo-00FGJx-Py for linux-arm-kernel@lists.infradead.org; Mon, 17 Jan 2022 14:56:28 +0000 Received: from x64host.home (unknown [47.187.212.181]) by linux.microsoft.com (Postfix) with ESMTPSA id DF10920B9132; Mon, 17 Jan 2022 06:56:24 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DF10920B9132 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1642431385; bh=rhBHT4pWL2EtwnMnXHgdH8kKNewQrrrjf2uA0J7NbA8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nzZvszMwzJPT/hLbYHnUV+wx3gVYk8YiVpdlSWKnEYVEkPOL6BXk0LyNvI53jiIRX HAtLP1HZ/n2AuOxl9SG6RP+sKkBrQOovtM/JaZITY4DP0pVsyU3EcVVVpa9vHX9crB sprEvRzK63heR62MevwiNV04lF9xlOO0Kf74QCqA= 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 v13 01/11] arm64: Remove NULL task check from unwind_frame() Date: Mon, 17 Jan 2022 08:55:58 -0600 Message-Id: <20220117145608.6781-2-madvenka@linux.microsoft.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220117145608.6781-1-madvenka@linux.microsoft.com> References: <95691cae4f4504f33d0fc9075541b1e7deefe96f> <20220117145608.6781-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-20220117_065626_952778_4551830A X-CRM114-Status: UNSURE ( 8.45 ) 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;