[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4953388d-bce4-37cd-f2b9-28dc3627c17d@redhat.com>
Date: Thu, 21 Jul 2022 14:14:16 -0400
From: Waiman Long <longman@...hat.com>
To: "yuxin.ye" <yeyuxin0925@...il.com>, linux-rt-users@...r.kernel.org,
peterz@...radead.org, mingo@...hat.com, will@...nel.org,
boqun.feng@...il.com
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC] rtmutex: Fix BUG_ON at kernel/locking/rtmutex.c:1331!
On 7/21/22 03:17, yuxin.ye wrote:
> On Wed, Jul 20, 2022 at 10:25:17PM -0400, Waiman Long wrote:
>> On 7/20/22 03:28, yuxin.ye wrote:
>>> before rt_mutex_adjust_prio_chain(),unlock lock->wait_lock will cause
>>> BUG_ON at kernel/locking/rtmutex.c:1331:
>> The current upstream kernel/locking/rtmutex.c has no BUG_ON() call. Which
>> version of the kernel are you using?
>>
>> Cheers,
>> Longman
>>
> The Linux version is 5.10.
> The upstream has indeed removed the BUG_ON, But in rt_mutex_adjust_prio_chain()
> it is still possible to have a thread is blocked by two locks. Can this situation
> be ignored without BUG_ON?
No. However, we don't remove the lock like what you do with your patch.
It will corrupt the data if multiple CPUs are allowed to run
rt_mutex_adjust_prio_chain() for the same rt_mutex simultaneously. You
need to find a way to fix the underlying problem.
BTW, I still can't see a BUG_ON at line 1331 of rtmutex.c with a v5.10
kernel. Does your source tree have some out-of-tree patches that
modifies rtmutex?
Cheers,
Longman
Powered by blists - more mailing lists