From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7FFFD63C; Thu, 15 Aug 2024 14:25:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723731956; cv=none; b=DGl5TAKUlnWdyhFVvB+NnWJLrm0LVoYqtpJup4zS1PXToRh/eGprB5MjnpFAVsDhf5UzlXYi7ZfK4q9VY6/tz++yZsRXwNg3itLyO8QGaFXpPcFzL3sesba4YI7K5NKTV6KxLTp5uvsNPf/XLNsR8L9IdKlbygGSzpqg728jlcQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723731956; c=relaxed/simple; bh=7+mQV+6P4a6fYnfYNx+apHpxyPPv44sQfMwCSIeDkrw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CeeHjUdZYp7vhgzGjSUipj0bqVYWKGTkee9xFRkchuuwjmFuzcZcd6NFBji47/5t4jiKbUaG7xDJKGIPT9KkvLgmxgTFOFRsgdM4ewNZOCqAnjYhcgC5rVWzr2DTgP3zUREOBNXgEp8QQBolwZ28uPDF4f77JGN4HcgoFuP+81g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hVSoEVYo; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="hVSoEVYo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0351C32786; Thu, 15 Aug 2024 14:25:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1723731956; bh=7+mQV+6P4a6fYnfYNx+apHpxyPPv44sQfMwCSIeDkrw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hVSoEVYowuzFeJRAbaIVDD38BJqheKKd+Envjp6FrN6IPAUw8zFe/zL4J23SNdyGD aHHW1+8FB7D/scwKuKAKmvLxTDHnWMX8i4OjmMiMPJwBYbiPGp5blmwQxPuOEn9sGJ QW7BbtvgpMrBLFdgHIZj0Mvn/mv9rwGs1DzFwRFE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Thorsten Blum , Geert Uytterhoeven , Sasha Levin Subject: [PATCH 5.10 030/352] m68k: cmpxchg: Fix return value for default case in __arch_xchg() Date: Thu, 15 Aug 2024 15:21:36 +0200 Message-ID: <20240815131920.390469059@linuxfoundation.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240815131919.196120297@linuxfoundation.org> References: <20240815131919.196120297@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thorsten Blum [ Upstream commit 21b9e722ad28c19c2bc83f18f540b3dbd89bf762 ] The return value of __invalid_xchg_size() is assigned to tmp instead of the return variable x. Assign it to x instead. Fixes: 2501cf768e4009a0 ("m68k: Fix xchg/cmpxchg to fail to link if given an inappropriate pointer") Signed-off-by: Thorsten Blum Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20240702034116.140234-2-thorsten.blum@toblux.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Sasha Levin --- arch/m68k/include/asm/cmpxchg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/m68k/include/asm/cmpxchg.h b/arch/m68k/include/asm/cmpxchg.h index 3a3bdcfcd3754..2035b30d79518 100644 --- a/arch/m68k/include/asm/cmpxchg.h +++ b/arch/m68k/include/asm/cmpxchg.h @@ -33,7 +33,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz x = tmp; break; default: - tmp = __invalid_xchg_size(x, ptr, size); + x = __invalid_xchg_size(x, ptr, size); break; } -- 2.43.0