Patch "m68k: cmpxchg: Fix return value for default case in __arch_xchg()" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    m68k: cmpxchg: Fix return value for default case in __arch_xchg()

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     m68k-cmpxchg-fix-return-value-for-default-case-in-__.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c67cac458e0b1746ca444aeec8df4fda131ea329
Author: Thorsten Blum <thorsten.blum@xxxxxxxxxx>
Date:   Tue Jul 2 05:41:17 2024 +0200

    m68k: cmpxchg: Fix return value for default case in __arch_xchg()
    
    [ 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 <thorsten.blum@xxxxxxxxxx>
    Reviewed-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/20240702034116.140234-2-thorsten.blum@xxxxxxxxxx
    Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

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;
 	}
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux