Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2307971imm; Mon, 28 May 2018 05:49:13 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqQXP2zS9Ntpif7UJQnLuyYR951pMpsquNmO7yJKiohrXc44x3pOu53JMJntLHsMbzSk0IM X-Received: by 2002:a65:61c8:: with SMTP id j8-v6mr10483279pgv.370.1527511753436; Mon, 28 May 2018 05:49:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527511753; cv=none; d=google.com; s=arc-20160816; b=z49Zd0T8qYD1cuwv7FAyi9QvDX3734HRWOtXlT3L4SgtOFcPRpyJPvCBS4Eivi0VCx NW0dM/vBXjMQCt36yBfM8jpcOyxgXtmJs5YOszwU7EQX4kyMLgmw8KmMmelU2vuYc7rA FBUdz69ZoHfp5nS1/oEo3Sl6SMfnJmSdEQvrzb8hYS7Kj9ktjzuluzHM4efTQLTQDJHu 7hR7WlzHRL0qd4RLXpImlw53+K6Rmw3nqawyg6XcnJXaGht2vCiaE3LPytcIckLwfpMv J6KYAnBQAu/TYnGpIm/CNwg3UCKgKtyn9JqqYW7zmBkdikJ/OHslQL+TfMh+mYEb+lHW RvPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=ORcU90cdcQu3q/gZd9ixvzaUVZ8xvlGn7K37MZJaQaM=; b=T3MBNrbk+MmWdf69YNfoA7UIwPznAoFc9Q+veqiE66gn6I9Y4IeQ8kQlBkxXQ9jPjW t2L4dIhpkKTkoGvlMBhJLiw8eCXBEHaLvLNk/ZHLFnptPu//7VdifUj73XLsJnsAfwOJ 7Lly2stvxpl6EpB4rkeY9mI1dEtupvF2om5YI4ys2+GlcJ5cZGIFHBXjoyGXI72EQBUq 0WkNhbjHWGiHNqHjVpM3Y21zzUunzBhisIBuaNILPoAL9Tc81Klgj8PXsdHwtrqYDvx0 52TyeHUL58w2TgxVq3ciej9mDgevoyRDB53D5niI2xgicBikpIflMGRmWd9p27Nj+iZO L8Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eLova1vT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r28-v6si3441906pfe.168.2018.05.28.05.48.58; Mon, 28 May 2018 05:49:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eLova1vT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937805AbeE1K5L (ORCPT + 99 others); Mon, 28 May 2018 06:57:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:45186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1164599AbeE1K4z (ORCPT ); Mon, 28 May 2018 06:56:55 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (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 53297208A2; Mon, 28 May 2018 10:56:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527505014; bh=1Y1qAn3FVVAYqkDFI1TwsNOITKQmuzznLBU6yowfkzQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eLova1vT+OkzEUW1+r4NihC/z23dmg+j1omaQDHlI5/D6ZmttIFCYb4Eqttx8HtMj 5xDWYeOwi/4677rtuv4g/C/++oOpjSOmJ/UlGqPmlESJpSU4scfqGcRbg9GXoK0ts3 uLmiyWByKZHx6/JR4GU33RdYzdd8D22Y+Ic2R2Fs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rich Felker , Sasha Levin Subject: [PATCH 4.14 317/496] sh: fix debug trap failure to process signals before return to user Date: Mon, 28 May 2018 12:01:42 +0200 Message-Id: <20180528100333.196874525@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rich Felker [ Upstream commit 96a598996f6ac518ac79839ecbb17c91af91f4f7 ] When responding to a debug trap (breakpoint) in userspace, the kernel's trap handler raised SIGTRAP but returned from the trap via a code path that ignored pending signals, resulting in an infinite loop re-executing the trapping instruction. Signed-off-by: Rich Felker Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/sh/kernel/entry-common.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/sh/kernel/entry-common.S +++ b/arch/sh/kernel/entry-common.S @@ -255,7 +255,7 @@ debug_trap: mov.l @r8, r8 jsr @r8 nop - bra __restore_all + bra ret_from_exception nop CFI_ENDPROC