From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752307AbdLGX1T (ORCPT ); Thu, 7 Dec 2017 18:27:19 -0500 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:46378 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750973AbdLGX1R (ORCPT ); Thu, 7 Dec 2017 18:27:17 -0500 X-Original-SENDERIP: 156.147.1.151 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 10.177.222.184 X-Original-MAILFROM: byungchul.park@lge.com Subject: Re: possible deadlock in generic_file_write_iter (2) To: Dmitry Vyukov Cc: Jan Kara , syzbot , Andrew Morton , Johannes Weiner , jlayton@redhat.com, LKML , Linux-MM , Mel Gorman , npiggin@gmail.com, rgoldwyn@suse.com, syzkaller-bugs@googlegroups.com, Peter Zijlstra , kernel-team@lge.com References: <94eb2c0d010a4e7897055f70535b@google.com> <20171204083339.GF8365@quack2.suse.cz> <80ba65b6-d0c2-2d3a-779b-a134af8a9054@lge.com> <20171206050547.GA5260@X58A-UD3R> From: Byungchul Park Message-ID: <740fcf68-091c-707a-2846-df3bf114e608@lge.com> Date: Fri, 8 Dec 2017 08:27:15 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/8/2017 2:07 AM, Dmitry Vyukov wrote: > On Wed, Dec 6, 2017 at 6:05 AM, Byungchul Park 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