locking/mutex: clear MUTEX_FLAGS if wait_list is empty due to signal
stable inclusion from linux-4.19.192 commit b31395e0d19017aaa83ee0e2dc0862954aca3aa3 -------------------------------- [ Upstream commit 3a010c49 ] When a interruptible mutex locker is interrupted by a signal without acquiring this lock and removed from the wait queue. if the mutex isn't contended enough to have a waiter put into the wait queue again, the setting of the WAITER bit will force mutex locker to go into the slowpath to acquire the lock every time, so if the wait queue is empty, the WAITER bit need to be clear. Fixes: 040a0a37 ("mutex: Add support for wound/wait style locks") Suggested-by: NPeter Zijlstra <peterz@infradead.org> Signed-off-by: NZqiang <qiang.zhang@windriver.com> Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20210517034005.30828-1-qiang.zhang@windriver.comSigned-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录