]> www.infradead.org Git - users/jedix/linux-maple.git/commit
locking/qrwlock: Fix write unlock bug on big endian systems
authorpan xinhui <xinhui.pan@linux.vnet.ibm.com>
Mon, 18 Jul 2016 09:47:39 +0000 (17:47 +0800)
committerAllen Pais <allen.pais@oracle.com>
Fri, 16 Jun 2017 08:46:50 +0000 (14:16 +0530)
commit050de715e92078850975b98c5a0a487d6d4950bc
tree69dd31e23d85f7e2ac26192ff2ffdcfb08e78dcc
parent1d8c6e7aaafa20d2e4a00ef1dc19c15a1c29700d
locking/qrwlock: Fix write unlock bug on big endian systems

This patch aims to get rid of endianness in queued_write_unlock(). We
want to set  __qrwlock->wmode to NULL, however the address is not
&lock->cnts in big endian machine. That causes queued_write_unlock()
write NULL to the wrong field of __qrwlock.

So implement __qrwlock_write_byte() which returns the correct
__qrwlock->wmode address.

Suggested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Waiman.Long@hpe.com
Cc: arnd@arndb.de
Cc: boqun.feng@gmail.com
Cc: will.deacon@arm.com
Link: http://lkml.kernel.org/r/1468835259-4486-1-git-send-email-xinhui.pan@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit 2db34e8bf9a22f4e38b29deccee57457bc0e7d74)

Signed-off-by: Babu Moger <babu.moger@oracle.com>
Orabug: 26183741
Signed-off-by: Allen Pais <allen.pais@oracle.com>
include/asm-generic/qrwlock.h