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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0F43C6FD1D for ; Tue, 21 Mar 2023 12:35:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229964AbjCUMfl (ORCPT ); Tue, 21 Mar 2023 08:35:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbjCUMfj (ORCPT ); Tue, 21 Mar 2023 08:35:39 -0400 Received: from xry111.site (xry111.site [89.208.246.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72D0F3A4D3 for ; Tue, 21 Mar 2023 05:35:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1679402137; bh=WqHd6UmiflAZuHzVPLhpeirTpk1BHvePg3JeMyhBQbE=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=bjCHwENxoDjb6bK4lLpiebeF4axazjLESvQBHn8qmKv1JeVbC91tDW/15BCkrCjI8 StazifwyGhK3Un1Bpi3TlA2A+8DsIgbuXUx1zbE00u30XESxFaOsqicrNufmwkGRmt bmULJfddPXeEiq/qN2+xZoHBWbynPVnfGHchj5kM= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384)) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id B90D765938; Tue, 21 Mar 2023 08:35:35 -0400 (EDT) Message-ID: <253a5dfcb7e41e44d15232e1891e7ea9d39dc953.camel@xry111.site> Subject: Re: [PATCH] LoongArch: Check unwind_error() in arch_stack_walk() From: Xi Ruoyao To: Tiezhu Yang , Huacai Chen , WANG Xuerui Cc: Guenter Roeck , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn Date: Tue, 21 Mar 2023 20:35:34 +0800 In-Reply-To: <1679380154-20308-1-git-send-email-yangtiezhu@loongson.cn> References: <1679380154-20308-1-git-send-email-yangtiezhu@loongson.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 User-Agent: Evolution 3.46.4 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gVHVlLCAyMDIzLTAzLTIxIGF0IDE0OjI5ICswODAwLCBUaWV6aHUgWWFuZyB3cm90ZToKPiBX ZSBjYW4gc2VlIHRoZSBmb2xsb3dpbmcgbWVzc2FnZXMgd2l0aCBDT05GSUdfUFJPVkVfTE9DS0lO Rz15IG9uCj4gTG9vbmdBcmNoOgo+IAo+IMKgIEJVRzogTUFYX1NUQUNLX1RSQUNFX0VOVFJJRVMg dG9vIGxvdyEKPiDCoCB0dXJuaW5nIG9mZiB0aGUgbG9ja2luZyBjb3JyZWN0bmVzcyB2YWxpZGF0 b3IuCj4gCj4gVGhpcyBpcyBiZWNhdXNlIHN0YWNrX3RyYWNlX3NhdmUoKSByZXR1cm5zIGEgYmln IHZhbHVlIGFmdGVyIGNhbGwKPiBhcmNoX3N0YWNrX3dhbGsoKSwgaGVyZSBpcyB0aGUgY2FsbCB0 cmFjZToKPiAKPiDCoCBzYXZlX3RyYWNlKCkKPiDCoMKgwqAgc3RhY2tfdHJhY2Vfc2F2ZSgpCj4g wqDCoMKgwqDCoCBhcmNoX3N0YWNrX3dhbGsoKQo+IMKgwqDCoMKgwqDCoMKgIHN0YWNrX3RyYWNl X2NvbnN1bWVfZW50cnkoKQo+IAo+IGFyY2hfc3RhY2tfd2FsaygpIHNob3VsZCByZXR1cm4gaW1t ZWRpYXRlbHkgaWYgdW53aW5kX25leHRfZnJhbWUoKQo+I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