Re: possible deadlock in generic_file_write_iter (2)

2017-12-07 Thread Byungchul Park
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 loc

Re: possible deadlock in generic_file_write_iter (2)

2017-12-07 Thread Dmitry Vyukov
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

Re: possible deadlock in generic_file_write_iter (2)

2017-12-06 Thread Andrew Morton
On Wed, 6 Dec 2017 14:05:47 +0900 Byungchul Park wrote: > > 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 crossr

Re: possible deadlock in generic_file_write_iter (2)

2017-12-05 Thread Byungchul Park
On Tue, Dec 05, 2017 at 10:41:50AM +0100, Jan Kara wrote: > > Hello Byungchul, > > On Tue 05-12-17 13:58:09, Byungchul Park wrote: > > On 12/4/2017 5:33 PM, Jan Kara wrote: > > >adding Peter and Byungchul to CC since the lockdep report just looks > > >strange and cross-release seems to be involve

Re: possible deadlock in generic_file_write_iter (2)

2017-12-05 Thread Byungchul Park
On Tue, Dec 05, 2017 at 10:19:07AM +0100, Dmitry Vyukov wrote: > On Tue, Dec 5, 2017 at 5:58 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 b

Re: possible deadlock in generic_file_write_iter (2)

2017-12-05 Thread Jan Kara
Hello Byungchul, On Tue 05-12-17 13:58:09, Byungchul Park wrote: > On 12/4/2017 5:33 PM, Jan Kara wrote: > >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

Re: possible deadlock in generic_file_write_iter (2)

2017-12-05 Thread Dmitry Vyukov
On Tue, Dec 5, 2017 at 5:58 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_uco

Re: possible deadlock in generic_file_write_iter (2)

2017-12-04 Thread Byungchul Park
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

Re: possible deadlock in generic_file_write_iter

2017-11-07 Thread Byungchul Park
11/7/2017 5:31 PM에 Dmitry Vyukov 이(가) 쓴 글: On Tue, Nov 7, 2017 at 9:30 AM, Byungchul Park wrote: 11/7/2017 5:11 PM에 Peter Zijlstra 이(가) 쓴 글: On Tue, Nov 07, 2017 at 09:54:42AM +0900, Byungchul Park wrote: The best I could come up with is something like the below; its not at all pretty and I

Re: possible deadlock in generic_file_write_iter

2017-11-07 Thread Dmitry Vyukov
On Tue, Nov 7, 2017 at 9:30 AM, Byungchul Park wrote: > 11/7/2017 5:11 PM에 Peter Zijlstra 이(가) 쓴 글: > >> On Tue, Nov 07, 2017 at 09:54:42AM +0900, Byungchul Park wrote: The best I could come up with is something like the below; its not at all pretty and I could see people objecting;

Re: possible deadlock in generic_file_write_iter

2017-11-07 Thread Byungchul Park
11/7/2017 5:11 PM에 Peter Zijlstra 이(가) 쓴 글: On Tue, Nov 07, 2017 at 09:54:42AM +0900, Byungchul Park wrote: The best I could come up with is something like the below; its not at all pretty and I could see people objecting; least of all myself for the __complete() thing, but I ran out of creative

Re: possible deadlock in generic_file_write_iter

2017-11-07 Thread Dmitry Vyukov
On Tue, Nov 7, 2017 at 9:11 AM, Peter Zijlstra wrote: > On Tue, Nov 07, 2017 at 09:54:42AM +0900, Byungchul Park wrote: >> > The best I could come up with is something like the below; its not >> > at all pretty and I could see people objecting; least of all myself for >> > the __complete() thing,

Re: possible deadlock in generic_file_write_iter

2017-11-07 Thread Peter Zijlstra
On Tue, Nov 07, 2017 at 09:54:42AM +0900, Byungchul Park wrote: > > The best I could come up with is something like the below; its not > > at all pretty and I could see people objecting; least of all myself for > > the __complete() thing, but I ran out of creative naming juice. > > Patches assigni

Re: possible deadlock in generic_file_write_iter

2017-11-06 Thread Byungchul Park
On Mon, Nov 06, 2017 at 05:01:07PM +0100, Peter Zijlstra wrote: > On Mon, Nov 06, 2017 at 02:35:44PM +0100, Dmitry Vyukov wrote: > > On Mon, Nov 6, 2017 at 2:33 PM, Al Viro wrote: > > > On Mon, Nov 06, 2017 at 02:15:44PM +0100, Jan Kara wrote: > > > > > >> > Should we annotate these inodes with di

Re: possible deadlock in generic_file_write_iter

2017-11-06 Thread Matthew Wilcox
On Mon, Nov 06, 2017 at 09:36:25AM -0800, Christoph Hellwig wrote: > How about complete_nodep() as name? Otherwise this looks ok to me - not > pretty, but not _that_ horrible either.. I read that as node-p, not no-dep. complete_nocheck()?

Re: possible deadlock in generic_file_write_iter

2017-11-06 Thread Christoph Hellwig
How about complete_nodep() as name? Otherwise this looks ok to me - not pretty, but not _that_ horrible either..

Re: possible deadlock in generic_file_write_iter

2017-11-06 Thread Peter Zijlstra
On Mon, Nov 06, 2017 at 02:35:44PM +0100, Dmitry Vyukov wrote: > On Mon, Nov 6, 2017 at 2:33 PM, Al Viro wrote: > > On Mon, Nov 06, 2017 at 02:15:44PM +0100, Jan Kara wrote: > > > >> > Should we annotate these inodes with different lock types? Or use > >> > nesting annotations? > >> > >> Well, you

Re: possible deadlock in generic_file_write_iter

2017-11-06 Thread Dmitry Vyukov
On Mon, Nov 6, 2017 at 2:33 PM, Al Viro wrote: > On Mon, Nov 06, 2017 at 02:15:44PM +0100, Jan Kara wrote: > >> > Should we annotate these inodes with different lock types? Or use >> > nesting annotations? >> >> Well, you'd need to have a completely separate set of locking classes for >> each file

Re: possible deadlock in generic_file_write_iter

2017-11-06 Thread Al Viro
On Mon, Nov 06, 2017 at 02:15:44PM +0100, Jan Kara wrote: > > Should we annotate these inodes with different lock types? Or use > > nesting annotations? > > Well, you'd need to have a completely separate set of locking classes for > each filesystem to avoid false positives like these. And that wo

Re: possible deadlock in generic_file_write_iter

2017-11-06 Thread Jan Kara
On Mon 06-11-17 09:32:35, Dmitry Vyukov wrote: > On Mon, Nov 6, 2017 at 6:29 AM, Al Viro wrote: > > On Sun, Nov 05, 2017 at 02:25:00AM -0800, syzbot wrote: > > > >> loop0/2986 is trying to acquire lock: > >> (&sb->s_type->i_mutex_key#9){}, at: [] inode_lock > >> include/linux/fs.h:712 [inline

Re: possible deadlock in generic_file_write_iter

2017-11-05 Thread Dmitry Vyukov
On Mon, Nov 6, 2017 at 6:29 AM, Al Viro wrote: > On Sun, Nov 05, 2017 at 02:25:00AM -0800, syzbot wrote: > >> loop0/2986 is trying to acquire lock: >> (&sb->s_type->i_mutex_key#9){}, at: [] inode_lock >> include/linux/fs.h:712 [inline] >> (&sb->s_type->i_mutex_key#9){}, at: [] >> generic

Re: possible deadlock in generic_file_write_iter

2017-11-05 Thread Al Viro
On Sun, Nov 05, 2017 at 02:25:00AM -0800, syzbot wrote: > loop0/2986 is trying to acquire lock: > (&sb->s_type->i_mutex_key#9){}, at: [] inode_lock > include/linux/fs.h:712 [inline] > (&sb->s_type->i_mutex_key#9){}, at: [] > generic_file_write_iter+0xdc/0x7a0 mm/filemap.c:3151 > > but n

Re: possible deadlock in generic_file_write_iter

2017-11-05 Thread Dmitry Vyukov
On Sun, Nov 5, 2017 at 1:25 PM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 7a95bdb092c66b6473aa2fc848862ae557ab08f7 > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is at