[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201804062255.HEJ82361.FJOFHVtSLOMOQF@I-love.SAKURA.ne.jp>
Date: Fri, 6 Apr 2018 22:55:03 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: peterz@...radead.org
Cc: viro@...iv.linux.org.uk, osandov@...com, dvyukov@...gle.com,
bot+abdba5bc6de135d7622f00756da97998425b6de5@...kaller.appspotmail.com,
axboe@...nel.dk, tom.leiming@...il.com, hare@...e.de, shli@...com,
linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com,
mingo@...hat.com, linux-fsdevel@...r.kernel.org, knikanth@...e.de
Subject: Re: INFO: task hung in lo_ioctl
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->lo_ctl_mutex) == current)
> > + mutex_unlock(&lo->lo_ctl_mutex);
>
> ARGGH.. you didn't read the comment we put on that?
>
Commit 5b52330bbfe63b33 ("audit: fix auditd/kernel connection state tracking")
is using __mutex_owner(). ;-)
Of course, regarding loop module, we will be able to add a flag variable
associated with lo->lo_ctl_mutex. But that will be done after we solved
the deadlock problem. I think whether we need to drop lo->lo_ctl_mutex is
not clear. Maybe
- err = mutex_lock_killable_nested(&lo->lo_ctl_mutex, 1);
+ err = mutex_lock_killable(&lo->lo_ctl_mutex);
on top of this patch and listen to the lockdep?
Commit f028f3b2f987ebc6 ("loop: fix circular locking in loop_clr_fd()") says
A simple way to silence lockdep could be to mark the lo_ctl_mutex
in ioctl to be a sub class, but this might mask some other real bugs.
and we are currently hitting a deadlock problem.
Powered by blists - more mailing lists