From: Jakub Kicinski <kuba@kernel.org>
To: Jeongjun Park <aha310510@gmail.com>
Cc: syzbot+8e03da5d64bc85098811@syzkaller.appspotmail.com,
ajk@comnets.uni-bremen.de, davem@davemloft.net,
edumazet@google.com, linux-hams@vger.kernel.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
pabeni@redhat.com, syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH net,v3] net: hams: Fix deadlock caused by unsafe-irq lock in sp_get()
Date: Fri, 19 Apr 2024 20:04:53 -0700 [thread overview]
Message-ID: <20240419200453.13301f29@kernel.org> (raw)
In-Reply-To: <20240419191438.30724-1-aha310510@gmail.com>
On Sat, 20 Apr 2024 04:14:38 +0900 Jeongjun Park wrote:
> read_lock() present in sp_get() is interrupt-vulnerable, so the function needs to be modified.
I was going to make the same comments as on the other submission
but then I realized this doesn't even build.
Please don't spam the list with completely untested code. You can
submit patches to syzbot for testing without CCing the list
or developers.
> Reported-by: syzbot+8e03da5d64bc85098811@syzkaller.appspotmail.com
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Jeongjun Park <aha310510@gmail.com>
> ---
> drivers/net/hamradio/6pack.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
> index 6ed38a3cdd73..fee583b1e59a 100644
> --- a/drivers/net/hamradio/6pack.c
> +++ b/drivers/net/hamradio/6pack.c
> @@ -373,11 +373,11 @@ static struct sixpack *sp_get(struct tty_struct *tty)
> {
> struct sixpack *sp;
>
> - read_lock(&disc_data_lock);
> + read_lock_irq(&disc_data_lock);
> sp = tty->disc_data;
> if (sp)
> refcount_inc(&sp->refcnt);
> - read_unlock(&disc_data_lock);
> + read_unlock_irq(&disc_data_lock);
>
> return sp;
> }
prev parent reply other threads:[~2024-04-20 3:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-02 17:32 [syzbot] [hams?] possible deadlock in serial8250_console_write syzbot
2024-04-19 17:43 ` [PATCH v2] net: hams: Fix deadlock caused by unsafe-irq lock in sp_get() Jeongjun Park
2024-04-19 19:14 ` [PATCH net,v3] " Jeongjun Park
2024-04-20 3:04 ` Jakub Kicinski [this message]
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=20240419200453.13301f29@kernel.org \
--to=kuba@kernel.org \
--cc=aha310510@gmail.com \
--cc=ajk@comnets.uni-bremen.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=linux-hams@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=syzbot+8e03da5d64bc85098811@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).