From: Jiri Slaby <jirislaby@kernel.org>
To: Jeongjun Park <aha310510@gmail.com>
Cc: davem@davemloft.net, edumazet@google.com,
gregkh@linuxfoundation.org, kuba@kernel.org,
linux-kernel@vger.kernel.org, linux-ppp@vger.kernel.org,
netdev@vger.kernel.org, pabeni@redhat.com,
syzbot+393d0ef63475d9bb1f16@syzkaller.appspotmail.com,
syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH net,v3] net: ppp: Fix deadlock caused by unsafe-irq lock in ap_get()
Date: Mon, 22 Apr 2024 09:29:37 +0200 [thread overview]
Message-ID: <bb5c1fd1-c3e7-4aaf-b28d-a45479ff0815@kernel.org> (raw)
In-Reply-To: <20240422071858.140237-1-aha310510@gmail.com>
On 22. 04. 24, 9:18, Jeongjun Park wrote:
> ========================================================
> WARNING: possible irq lock inversion dependency detected
> 6.8.0-rc3-syzkaller-00041-g547ab8fc4cb0 #0 Not tainted
> --------------------------------------------------------
...
> ... key at: [<ffffffff947ae860>] port_lock_key+0x0/0x20
> ... acquired at:
> lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754
> __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
> _raw_read_lock+0x36/0x50 kernel/locking/spinlock.c:228
> ap_get drivers/net/ppp/ppp_async.c:136 [inline]
> ppp_asynctty_wakeup+0x20/0x210 drivers/net/ppp/ppp_async.c:352
> tty_wakeup+0xbb/0x100 drivers/tty/tty_io.c:523
> tty_port_default_wakeup+0xa6/0xf0 drivers/tty/tty_port.c:69
> serial8250_tx_chars+0x6ad/0x8a0 drivers/tty/serial/8250/8250_port.c:1835
> This is the stack trace for the issue causing the deadlock reported
> by syzbot. I think there is definitely a problem with ap_get() and
> this needs to be fixed.
OK, but read_unlock_irq() is not the right way to do it. It would enable
irqs unconditionally, so serial8250_tx_chars() would not thank you in
the above call chain.
Plus the issues Jakub had with the patch.
And what about ppp_synctty?
thanks,
--
js
suse labs
next prev parent reply other threads:[~2024-04-22 7:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-12 2:34 [syzbot] [ppp?] possible deadlock in ppp_asynctty_receive (2) syzbot
2024-04-19 18:12 ` [PATCH net,v2] net: ppp: Fix deadlock caused by unsafe-irq lock in ap_get() Jeongjun Park
2024-04-19 18:38 ` [PATCH net,v3] " Jeongjun Park
2024-04-20 0:31 ` Jakub Kicinski
2024-04-22 6:39 ` Jiri Slaby
2024-04-22 7:18 ` Jeongjun Park
2024-04-22 7:29 ` Jiri Slaby [this message]
2024-04-22 8:58 ` Jeongjun Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bb5c1fd1-c3e7-4aaf-b28d-a45479ff0815@kernel.org \
--to=jirislaby@kernel.org \
--cc=aha310510@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ppp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=syzbot+393d0ef63475d9bb1f16@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).