lkml.org 
[lkml]   [2024]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [syzbot] [syzbot] [kernel?] inconsistent lock state in sock_hash_delete_elem
From
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: [syzbot] [kernel?] inconsistent lock state in sock_hash_delete_elem
Author: lizhi.xu@windriver.com

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fe46a7dd189e

diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index d2242679239e..a7aa4f31c0e2 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1696,6 +1696,7 @@ static inline void
rq_lock(struct rq *rq, struct rq_flags *rf)
__acquires(rq->lock)
{
+ local_irq_save(rf->flags);
raw_spin_rq_lock(rq);
rq_pin_lock(rq, rf);
}
@@ -1722,6 +1723,7 @@ rq_unlock(struct rq *rq, struct rq_flags *rf)
{
rq_unpin_lock(rq, rf);
raw_spin_rq_unlock(rq);
+ local_irq_restore(rf->flags);
}

DEFINE_LOCK_GUARD_1(rq_lock, struct rq,
\
 
 \ /
  Last update: 2024-05-27 16:17    [W:0.085 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site