[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240419181238.29399-1-aha310510@gmail.com>
Date: Sat, 20 Apr 2024 03:12:38 +0900
From: Jeongjun Park <aha310510@...il.com>
To: syzbot+393d0ef63475d9bb1f16@...kaller.appspotmail.com
Cc: davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
linux-kernel@...r.kernel.org,
linux-ppp@...r.kernel.org,
netdev@...r.kernel.org,
pabeni@...hat.com,
syzkaller-bugs@...glegroups.com,
Jeongjun Park <aha310510@...il.com>
Subject: [PATCH net,v2] net: ppp: Fix deadlock caused by unsafe-irq lock in ap_get()
read_lock() present in ap_get() is interrupt-vulnerable, so the function needs to be modified.
Reported-by: syzbot+393d0ef63475d9bb1f16@...kaller.appspotmail.com
Signed-off-by: Jeongjun Park <aha310510@...il.com>
---
drivers/net/ppp/ppp_async.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ppp/ppp_async.c b/drivers/net/ppp/ppp_async.c
index c33c3db3cc08..d12b8155e839 100644
--- a/drivers/net/ppp/ppp_async.c
+++ b/drivers/net/ppp/ppp_async.c
@@ -134,11 +134,11 @@ static struct asyncppp *ap_get(struct tty_struct *tty)
{
struct asyncppp *ap;
- read_lock(&disc_data_lock);
+ read_lock_irq(&disc_data_lock);
ap = tty->disc_data;
if (ap != NULL)
refcount_inc(&ap->refcnt);
- read_unlock(&disc_data_lock);
+ read_unlock_irq(&disc_data_lock);
return ap;
}
--
2.34.1
Powered by blists - more mailing lists