From: Dan Carpenter <dan.carpenter@linaro.org>
To: Jeongjun Park <aha310510@gmail.com>
Cc: ajk@comnets.uni-bremen.de, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, linux-hams@vger.kernel.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
syzkaller-bugs@googlegroups.com,
syzbot+8e03da5d64bc85098811@syzkaller.appspotmail.com
Subject: Re: [PATCH] hams: Fix deadlock caused by unsafe-irq lock in sp_get()
Date: Mon, 22 Apr 2024 15:47:15 +0300 [thread overview]
Message-ID: <bac3fb0d-2810-496d-b3ef-26a7f208ec51@moroto.mountain> (raw)
In-Reply-To: <20240418173037.6714-1-aha310510@gmail.com>
On Fri, Apr 19, 2024 at 02:30:37AM +0900, Jeongjun Park wrote:
>
> read_lock() present in sp_get() is interrupt-vulnerable, so the function needs to be modified.
>
>
> Reported-by: syzbot+8e03da5d64bc85098811@syzkaller.appspotmail.com
> Signed-off-by: Jeongjun Park <aha310510@gmail.com>
> ---
> drivers/net/hamradio/6pack.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
> index 6ed38a3cdd73..f882682ff0c8 100644
> --- a/drivers/net/hamradio/6pack.c
> +++ b/drivers/net/hamradio/6pack.c
> @@ -372,12 +372,13 @@ static DEFINE_RWLOCK(disc_data_lock);
> static struct sixpack *sp_get(struct tty_struct *tty)
> {
> struct sixpack *sp;
> + unsigned long flags;
>
> - read_lock(&disc_data_lock);
> + flags = read_lock_irqsave(&disc_data_lock);
This doesn't compile. At least build test your patches.
regards,
dan carpenter
prev parent reply other threads:[~2024-04-22 12:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-18 17:30 Jeongjun Park
2024-04-22 12:47 ` Dan Carpenter [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=bac3fb0d-2810-496d-b3ef-26a7f208ec51@moroto.mountain \
--to=dan.carpenter@linaro.org \
--cc=aha310510@gmail.com \
--cc=ajk@comnets.uni-bremen.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-hams@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--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
all inboxes | Powered by JetHome®