Re: INFO: task hung in lo_ioctl

2019-01-20 Thread Dmitry Vyukov
On Sun, Jan 20, 2019 at 3:36 AM Tetsuo Handa wrote: > > On 2019/01/20 3:56, Dmitry Vyukov wrote: > >> Seems easy enough to fix without resorting to __mutex_owner() (untested): > >> > >> > >> diff --git a/drivers/block/loop.c b/drivers/block/loop.c > >> index 264abaaff662..cee258d12a1e 100644 > >>

Re: INFO: task hung in lo_ioctl

2019-01-19 Thread Tetsuo Handa
On 2019/01/20 3:56, Dmitry Vyukov wrote: >> Seems easy enough to fix without resorting to __mutex_owner() (untested): >> >> >> diff --git a/drivers/block/loop.c b/drivers/block/loop.c >> index 264abaaff662..cee258d12a1e 100644 >> --- a/drivers/block/loop.c >> +++ b/drivers/block/loop.c >> @@

Re: INFO: task hung in lo_ioctl

2019-01-19 Thread Dmitry Vyukov
On Fri, Apr 6, 2018 at 5:59 PM Omar Sandoval wrote: > > On Fri, Apr 06, 2018 at 05:43:43PM +0200, Peter Zijlstra wrote: > > On Fri, Apr 06, 2018 at 10:55:03PM +0900, Tetsuo Handa wrote: > > > Peter Zijlstra wrote: > > > > On Fri, Apr 06, 2018 at 09:04:18PM +0900, Tetsuo Handa wrote: > > > > > +

Re: INFO: task hung in lo_ioctl

2018-04-06 Thread Omar Sandoval
On Fri, Apr 06, 2018 at 05:43:43PM +0200, Peter Zijlstra wrote: > On Fri, Apr 06, 2018 at 10:55:03PM +0900, Tetsuo Handa wrote: > > Peter Zijlstra wrote: > > > On Fri, Apr 06, 2018 at 09:04:18PM +0900, Tetsuo Handa wrote: > > > > + /* Temporary hack for handling lock imbalance. */ > > > > +

Re: INFO: task hung in lo_ioctl

2018-04-06 Thread Omar Sandoval
On Fri, Apr 06, 2018 at 05:43:43PM +0200, Peter Zijlstra wrote: > On Fri, Apr 06, 2018 at 10:55:03PM +0900, Tetsuo Handa wrote: > > Peter Zijlstra wrote: > > > On Fri, Apr 06, 2018 at 09:04:18PM +0900, Tetsuo Handa wrote: > > > > + /* Temporary hack for handling lock imbalance. */ > > > > +

Re: INFO: task hung in lo_ioctl

2018-04-06 Thread Peter Zijlstra
On Fri, Apr 06, 2018 at 10:55:03PM +0900, Tetsuo Handa wrote: > Peter Zijlstra wrote: > > On Fri, Apr 06, 2018 at 09:04:18PM +0900, Tetsuo Handa wrote: > > > + /* Temporary hack for handling lock imbalance. */ > > > + if (__mutex_owner(>lo_ctl_mutex) == current) > > > +

Re: INFO: task hung in lo_ioctl

2018-04-06 Thread Peter Zijlstra
On Fri, Apr 06, 2018 at 10:55:03PM +0900, Tetsuo Handa wrote: > Peter Zijlstra wrote: > > On Fri, Apr 06, 2018 at 09:04:18PM +0900, Tetsuo Handa wrote: > > > + /* Temporary hack for handling lock imbalance. */ > > > + if (__mutex_owner(>lo_ctl_mutex) == current) > > > +

Re: INFO: task hung in lo_ioctl

2018-04-06 Thread Tetsuo Handa
Peter Zijlstra wrote: > On Fri, Apr 06, 2018 at 09:04:18PM +0900, Tetsuo Handa wrote: > > + /* Temporary hack for handling lock imbalance. */ > > + if (__mutex_owner(>lo_ctl_mutex) == current) > > + mutex_unlock(>lo_ctl_mutex); > > ARGGH.. you didn't read the comment we put on that?

Re: INFO: task hung in lo_ioctl

2018-04-06 Thread Tetsuo Handa
Peter Zijlstra wrote: > On Fri, Apr 06, 2018 at 09:04:18PM +0900, Tetsuo Handa wrote: > > + /* Temporary hack for handling lock imbalance. */ > > + if (__mutex_owner(>lo_ctl_mutex) == current) > > + mutex_unlock(>lo_ctl_mutex); > > ARGGH.. you didn't read the comment we put on that?

Re: INFO: task hung in lo_ioctl

2018-04-06 Thread Peter Zijlstra
On Fri, Apr 06, 2018 at 09:04:18PM +0900, Tetsuo Handa wrote: > + /* Temporary hack for handling lock imbalance. */ > + if (__mutex_owner(>lo_ctl_mutex) == current) > + mutex_unlock(>lo_ctl_mutex); ARGGH.. you didn't read the comment we put on that?

Re: INFO: task hung in lo_ioctl

2018-04-06 Thread Peter Zijlstra
On Fri, Apr 06, 2018 at 09:04:18PM +0900, Tetsuo Handa wrote: > + /* Temporary hack for handling lock imbalance. */ > + if (__mutex_owner(>lo_ctl_mutex) == current) > + mutex_unlock(>lo_ctl_mutex); ARGGH.. you didn't read the comment we put on that?

Re: INFO: task hung in lo_ioctl

2018-04-06 Thread Tetsuo Handa
On 2018/04/05 0:23, Tetsuo Handa wrote: > This seems to be an AB-BA deadlock where the lockdep cannot report (due to > use of nested lock?). > What is happening here? > This patch does not directly fix the bug syzbot is reporting, but could be relevant. Maybe try replacing

Re: INFO: task hung in lo_ioctl

2018-04-06 Thread Tetsuo Handa
On 2018/04/05 0:23, Tetsuo Handa wrote: > This seems to be an AB-BA deadlock where the lockdep cannot report (due to > use of nested lock?). > What is happening here? > This patch does not directly fix the bug syzbot is reporting, but could be relevant. Maybe try replacing

Re: INFO: task hung in lo_ioctl

2018-04-04 Thread Tetsuo Handa
This seems to be an AB-BA deadlock where the lockdep cannot report (due to use of nested lock?). When PID=6540 was (reported as hung) at mutex_lock_nested(>lo_ctl_mutex, 1) (id=43ca8836), it was already holding down_write_nested(>s_umount, SINGLE_DEPTH_NESTING) (id=566d4c39). But when PID=6541

Re: INFO: task hung in lo_ioctl

2018-04-04 Thread Tetsuo Handa
This seems to be an AB-BA deadlock where the lockdep cannot report (due to use of nested lock?). When PID=6540 was (reported as hung) at mutex_lock_nested(>lo_ctl_mutex, 1) (id=43ca8836), it was already holding down_write_nested(>s_umount, SINGLE_DEPTH_NESTING) (id=566d4c39). But when PID=6541

Re: INFO: task hung in lo_ioctl

2017-12-12 Thread Dmitry Vyukov
On Sun, Dec 10, 2017 at 2:32 PM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > ad4dac17f9d563b9e34aab78a34293b10993e9b5 > git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master >

Re: INFO: task hung in lo_ioctl

2017-12-12 Thread Dmitry Vyukov
On Sun, Dec 10, 2017 at 2:32 PM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > ad4dac17f9d563b9e34aab78a34293b10993e9b5 > git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is