Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp735441ybz; Sat, 25 Apr 2020 03:11:06 -0700 (PDT) X-Google-Smtp-Source: APiQypKevH9rT3JThh4M36t5x07YfUl2VAjBUfkCBjtMy+OivAZEJBdndVV8ZmeWWIcaGbXXA6qC X-Received: by 2002:a05:6402:b4c:: with SMTP id bx12mr11377728edb.247.1587809466405; Sat, 25 Apr 2020 03:11:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587809466; cv=none; d=google.com; s=arc-20160816; b=z8104i79O8pJyLnc/aMi78qd2ai2dKMzGH8zyoKlNWDZeCFyBvrhWSepFY4ZdVr8xY nb/MvjcxNrgeVVF+0iLWnResYKXWNv3tLH9gXOTwtJb58turru9MWspvuy8Zgkmkk5wr pAEEb2mLEuH1sUqglmE3r+Mb/9dpJzVm4JCQhfjeDH7ZB2Iq2/rffUSsQX/BPK7dJ8/U oxLxldHAXw/7oJxQKprvqoID+lxryByl1GM0ufrMQeyODaNlkQDkJ+FYwtaf2cywV5RW r5ECVNSjY8vBe5C+tydshssS7ZQG+jxzaz972R7ohttQ3Oz/BiXSnISX5MSdFgbFNxGG ybuA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kzxLxZUP08+GEcYCuqNQ88gHYUOw77MUoChMYioMNNk=; b=W0pZEvwqZRUEEzOfxLLpKm87+MqPEm2GdwIpE8hyoK1e60owk9N5mEWbYED0xALAeT 9rNIIRNhwHyM3LnOgEkBNRgiCUYCP0a6F9LTJWCmeHg3S/D5f8+BJgkgH51YfrPAW2Mn vtE2fxMOv4YjfKmbktwpJd6KSrSFTEjXNsgGzIYP0cgUzbOS4l5hkbSCEniR4KdTvdbe bIL+fK4b25jYM0tNpgGsyuihWhUqcjhNqcrxzPlunlBW39i3mdVhncWilFHm2mwfWGSB bYgy3HEjwXTW+gSyQJ9n4iX+eu0BNZ/jIJdWz24+qD1gZ442YD1hNn037bNjbeEvhYgu JrAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Tl5N6j9A; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e17si4624148edj.499.2020.04.25.03.10.41; Sat, 25 Apr 2020 03:11:06 -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=@redhat.com header.s=mimecast20190719 header.b=Tl5N6j9A; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726090AbgDYKGZ (ORCPT + 99 others); Sat, 25 Apr 2020 06:06:25 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:52143 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726050AbgDYKGY (ORCPT ); Sat, 25 Apr 2020 06:06:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587809183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kzxLxZUP08+GEcYCuqNQ88gHYUOw77MUoChMYioMNNk=; b=Tl5N6j9AUQ2UbqClF7wMZysRCQo2qqPMD0xdhEEzhxjHxPvM0dVaNtQFHzwzWAB60WQ21l OtfR91EiOlJn4qdwuR4om7us/h1NABfsGeszLt9O1bfLF2jXnL2IxfpCURQxbpmcMETBoM rNDPdNk84hQ1goBc7XNFdn01/AFC4cM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-105-rDYW6-T1P4eKbg2wHZKGkA-1; Sat, 25 Apr 2020 06:06:19 -0400 X-MC-Unique: rDYW6-T1P4eKbg2wHZKGkA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0755C8015CB; Sat, 25 Apr 2020 10:06:18 +0000 (UTC) Received: from treble.redhat.com (ovpn-114-29.rdu2.redhat.com [10.10.114.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id D668760BE1; Sat, 25 Apr 2020 10:06:16 +0000 (UTC) From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Vince Weaver , Dave Jones , Jann Horn , Miroslav Benes , Andy Lutomirski , Thomas Gleixner Subject: [PATCH v2 10/11] x86/unwind/orc: Fix error path for bad ORC entry type Date: Sat, 25 Apr 2020 05:06:13 -0500 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If the ORC entry type is unknown, nothing else can be done other than reporting an error. Exit the function instead of breaking out of the switch statement. Fixes: ee9f8fce9964 ("x86/unwind: Add the ORC unwinder") Signed-off-by: Josh Poimboeuf Reviewed-by: Miroslav Benes --- arch/x86/kernel/unwind_orc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/unwind_orc.c b/arch/x86/kernel/unwind_orc.c index cb11567361cc..33b80a7f998f 100644 --- a/arch/x86/kernel/unwind_orc.c +++ b/arch/x86/kernel/unwind_orc.c @@ -537,7 +537,7 @@ bool unwind_next_frame(struct unwind_state *state) default: orc_warn("unknown .orc_unwind entry type %d at %pB\n", orc->type, (void *)orig_ip); - break; + goto err; } =20 /* Find BP: */ --=20 2.21.1