提交 3b113191 编写于 作者: W Waiman Long 提交者: Xie XiuQi

locking/qspinlock: Remove unnecessary BUG_ON() call

mainline inclusion
from mainline-5.1-rc1
commit 733000c7
category: bugfix
bugzilla: 13227
CVE: NA

-------------------------------------------------

With the > 4 nesting levels case handled by the commit: commit

  d682b596 ("locking/qspinlock: Handle > 4 slowpath nesting levels")

the BUG_ON() call in encode_tail() will never actually be triggered.

Remove it.
Signed-off-by: NWaiman Long <longman@redhat.com>
Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: NWill Deacon <will.deacon@arm.com>
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>
Link: https://lkml.kernel.org/r/1551057253-3231-1-git-send-email-longman@redhat.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
Signed-off-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 bd3656c2
...@@ -124,9 +124,6 @@ static inline __pure u32 encode_tail(int cpu, int idx) ...@@ -124,9 +124,6 @@ static inline __pure u32 encode_tail(int cpu, int idx)
{ {
u32 tail; u32 tail;
#ifdef CONFIG_DEBUG_SPINLOCK
BUG_ON(idx > 3);
#endif
tail = (cpu + 1) << _Q_TAIL_CPU_OFFSET; tail = (cpu + 1) << _Q_TAIL_CPU_OFFSET;
tail |= idx << _Q_TAIL_IDX_OFFSET; /* assume < 4 */ tail |= idx << _Q_TAIL_IDX_OFFSET; /* assume < 4 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册