lkml.org 
[lkml]   [2017]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: possible deadlock in generic_file_write_iter (2)
From
Date
On 12/8/2017 2:07 AM, Dmitry Vyukov wrote:
> On Wed, Dec 6, 2017 at 6:05 AM, Byungchul Park <byungchul.park@lge.com> wrote:
>>>> On 12/4/2017 5:33 PM, Jan Kara wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> adding Peter and Byungchul to CC since the lockdep report just looks
>>>>> strange and cross-release seems to be involved. Guys, how did #5 get into
>>>>> the lock chain and what does put_ucounts() have to do with sb_writers
>>>>> there? Thanks!
>>>>
>>>>
>>>> Hello Jan,
>>>>
>>>> In order to get full stack of #5, we have to pass a boot param,
>>>> "crossrelease_fullstack", to the kernel. Now that it only informs
>>>> put_ucounts() in the call trace, it's hard to find out what exactly
>>>> happened at that time, but I can tell #5 shows:
>>>>
>>>> When acquire(sb_writers) in put_ucounts(), it was on the way to
>>>> complete((completion)&req.done) of wait_for_completion() in
>>>> devtmpfs_create_node().
>>>>
>>>> If acquire(sb_writers) in put_ucounts() is stuck, then
>>>> wait_for_completion() in devtmpfs_create_node() would be also
>>>> stuck, since complete() being in the context of acquire(sb_writers)
>>>> cannot be called.
>>>>
>>>> This is why cross-release added the lock chain.
>>>
>>> Hi,
>>>
>>> What is cross-release? Is it something new? Should we always enable
>>> crossrelease_fullstack during testing?
>>
>> Hello Dmitry,
>>
>> Yes, it's new one making lockdep track wait_for_completion() as well.
>>
>> And we should enable crossrelease_fullstack if you don't care system
>> slowdown but testing.
>
> I've enabled CONFIG_BOOTPARAM_LOCKDEP_CROSSRELEASE_FULLSTACK. It
> should have the same effect, right?

Sure.

--
Thanks,
Byungchul

\
 
 \ /
  Last update: 2017-12-08 00:27    [W:0.045 / U:0.052 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site