{"push_id":1519149920,"size":1,"distinct_size":1,"ref":"refs/heads/cm-14.1","head":"9784826d058b9446cd09c6c9a1779753e313c992","before":"07e9b376d95c52f9df6e0abbaf5464ab2e858788","commits":[{"sha":"9784826d058b9446cd09c6c9a1779753e313c992","author":{"name":"Catalin Marinas","email":"6aa257b0f6444d48b36b727fdf3f5c1074b85fd0@arm.com"},"message":"futex: Ensure get_futex_key_refs() always implies a barrier\n\ncommit 76835b0ebf8a7fe85beb03c75121419a7dec52f0 upstream.\n\nCommit b0c29f79ecea (futexes: Avoid taking the hb->lock if there's\nnothing to wake up) changes the futex code to avoid taking a lock when\nthere are no waiters. This code has been subsequently fixed in commit\n11d4616bd07f (futex: revert back to the explicit waiter counting code).\nBoth the original commit and the fix-up rely on get_futex_key_refs() to\nalways imply a barrier.\n\nHowever, for private futexes, none of the cases in the switch statement\nof get_futex_key_refs() would be hit and the function completes without\na memory barrier as required before checking the \"waiters\" in\nfutex_wake() -> hb_waiters_pending(). The consequence is a race with a\nthread waiting on a futex on another CPU, allowing the waker thread to\nread \"waiters == 0\" while the waiter thread to have read \"futex_val ==\nlocked\" (in kernel).\n\nWithout this fix, the problem (user space deadlocks) can be seen with\nAndroid bionic's mutex implementation on an arm64 multi-cluster system.\n\nChange-Id: I4f2777c37b72d30a899fbf87ebcf53a7d690876e\nSigned-off-by: Catalin Marinas <catalin.marinas@arm.com>\nReported-by: Matteo Franchin <Matteo.Franchin@arm.com>\nFixes: b0c29f79ecea (futexes: Avoid taking the hb->lock if there's nothing to wake up)\nAcked-by: Davidlohr Bueso <dave@stgolabs.net>\nTested-by: Mike Galbraith <umgwanakikbuti@gmail.com>\nCc: Darren Hart <dvhart@linux.intel.com>\nCc: Thomas Gleixner <tglx@linutronix.de>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Ingo Molnar <mingo@kernel.org>\nCc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Zefan Li <lizefan@huawei.com>","distinct":true,"url":"https://api.github.com/repos/LineageOS/android_kernel_lge_v500/commits/9784826d058b9446cd09c6c9a1779753e313c992"}]}
{"actor":{"display_login":"lineageos-gerrit"}}