Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1313160
| From | Dmitry Vyukov <dvyukov@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: tty: deadlock between n_tracerouter_receivebuf and flush_to_ldisc |
| Date | 2016-01-20 13:00 +0100 |
| Message-ID | <qSZAD-5Pv-15@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <qR7sC-2Y8-13@gated-at.bofh.it> <qRfzR-gk-31@gated-at.bofh.it> <qRgme-OC-7@gated-at.bofh.it> <qSXp9-4uM-25@gated-at.bofh.it> <qSZqV-5Mi-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jan 20, 2016 at 12:44 PM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Wed, Jan 20, 2016 at 10:36:01AM +0100, Dmitry Vyukov wrote:
>
>> +Peter, Ingo, can you please suggest a way to annotate this locking
>> pattern to avoid lockdep false positive?
>
> No, because I haven't a clue what the actual problem is.
>
> The report is fairly clear on how:
>
> routelock
> &port->buf.lock/1
> &o_tty->termios_rwsem/1
> &buf->lock
>
> gets established, and shows where we try:
>
> &buf->lock
> routelock
>
> Which gives a circle, ergo deadlock.
>
> Show which link is wrong and why, and I can suggest ways of annotating
> that.
Alan provided an explanation calling this "false report":
https://groups.google.com/d/msg/syzkaller/YrV0bzdfa-g/cCVoUf1OFQAJ
And I don't understand how the following is a deadlock, since there is
no cycle...
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&buf->lock);
lock(&o_tty->termios_rwsem/1);
lock(&buf->lock);
lock(routelock);
Shouldn't it look like:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&buf->lock);
lock(routelock);
lock(&buf->lock);
lock(routelock);
?
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: tty: deadlock between n_tracerouter_receivebuf and flush_to_ldisc One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-01-15 17:40 +0100
Re: tty: deadlock between n_tracerouter_receivebuf and flush_to_ldisc Dmitry Vyukov <dvyukov@google.com> - 2016-01-15 18:30 +0100
Re: tty: deadlock between n_tracerouter_receivebuf and flush_to_ldisc Dmitry Vyukov <dvyukov@google.com> - 2016-01-20 10:40 +0100
Re: tty: deadlock between n_tracerouter_receivebuf and flush_to_ldisc Peter Zijlstra <peterz@infradead.org> - 2016-01-20 12:50 +0100
Re: tty: deadlock between n_tracerouter_receivebuf and flush_to_ldisc Dmitry Vyukov <dvyukov@google.com> - 2016-01-20 13:00 +0100
Re: tty: deadlock between n_tracerouter_receivebuf and flush_to_ldisc Peter Zijlstra <peterz@infradead.org> - 2016-01-20 13:10 +0100
Re: tty: deadlock between n_tracerouter_receivebuf and flush_to_ldisc One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-01-20 16:00 +0100
Re: tty: deadlock between n_tracerouter_receivebuf and flush_to_ldisc Dmitry Vyukov <dvyukov@google.com> - 2016-01-20 16:20 +0100
Re: tty: deadlock between n_tracerouter_receivebuf and flush_to_ldisc Peter Zijlstra <peterz@infradead.org> - 2016-01-20 17:40 +0100
Re: tty: deadlock between n_tracerouter_receivebuf and flush_to_ldisc J Freyensee <james_p_freyensee@linux.intel.com> - 2016-01-20 03:10 +0100
csiph-web