From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 670F9C10F13 for ; Mon, 8 Apr 2019 14:45:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 354402147A for ; Mon, 8 Apr 2019 14:45:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554734755; bh=7CT6srUT0H4ym+4CR+XxqJhImsnPGQSFIcHxhxcqv4c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=lGc1fxPbSkc3J+JYA4ckwFImQkJaf8dSqvkKL/Rw0zH+72n590ENWOoUUTU5HKBP2 QCB59IMozcctA0Y7V1DYw9PBeuSvP/z2jSto/7hQvSmodBeqTDC93DiYaM74SWv8CM TFzyWBwW+Akuer4vUcELy3gfCPCb5pR5HJEIekAU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726575AbfDHOpy (ORCPT ); Mon, 8 Apr 2019 10:45:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:43070 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726372AbfDHOpy (ORCPT ); Mon, 8 Apr 2019 10:45:54 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (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 659B120879; Mon, 8 Apr 2019 14:45:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554734753; bh=7CT6srUT0H4ym+4CR+XxqJhImsnPGQSFIcHxhxcqv4c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vgwFhZ6xD+4RoDSqyaHFmez7gq84YhA/pwBnPTqkT1EBZ80ZgwI1lxGBdI3QJp7Xh JuLjH/H+29RCHO1hJ2ICnUrzsKUrhrX/9Xu1TmSuaHy8HyDDIDTNXeq2+GiPco5w51 FR3DnWjN1bilEKPdghV3ayo4nttx4kofBw0SZqRc= Date: Mon, 8 Apr 2019 10:45:52 -0400 From: Sasha Levin To: Michael Neuling Cc: stable@vger.kernel.org, Fredrik Noring , Breno Leitao , Christoph Biedl , Michael Ellerman Subject: Re: [PATCH 4.19] powerpc/tm: Limit TM code inside PPC_TRANSACTIONAL_MEM Message-ID: <20190408144552.GF4689@sasha-vm> References: <20190408063238.16181-1-mikey@neuling.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190408063238.16181-1-mikey@neuling.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Mon, Apr 08, 2019 at 04:32:38PM +1000, Michael Neuling wrote: >From: Breno Leitao > >commit 897bc3df8c5aebb54c32d831f917592e873d0559 upstream. > >Commit e1c3743e1a20 ("powerpc/tm: Set MSR[TS] just prior to recheckpoint") >moved a code block around and this block uses a 'msr' variable outside of >the CONFIG_PPC_TRANSACTIONAL_MEM, however the 'msr' variable is declared >inside a CONFIG_PPC_TRANSACTIONAL_MEM block, causing a possible error when >CONFIG_PPC_TRANSACTION_MEM is not defined. > > error: 'msr' undeclared (first use in this function) > >This is not causing a compilation error in the mainline kernel, because >'msr' is being used as an argument of MSR_TM_ACTIVE(), which is defined as >the following when CONFIG_PPC_TRANSACTIONAL_MEM is *not* set: > > #define MSR_TM_ACTIVE(x) 0 > >This patch just fixes this issue avoiding the 'msr' variable usage outside >the CONFIG_PPC_TRANSACTIONAL_MEM block, avoiding trusting in the >MSR_TM_ACTIVE() definition. > >Cc: stable@vger.kernel.org >Reported-by: Christoph Biedl >Fixes: e1c3743e1a20 ("powerpc/tm: Set MSR[TS] just prior to recheckpoint") >Signed-off-by: Breno Leitao >Signed-off-by: Michael Ellerman >Signed-off-by: Michael Neuling >--- >Greg: I think the original patch got rejected with a conflict. >This correctly applies to v4.19.34. Thanks for the backport, I've queued it for 4.9-4.19 since the patch it fixes is included in all of those. -- Thanks, Sasha