From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+8863ad36d31449b4dc17@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [hams?] possible deadlock in nr_remove_neigh (2)
Date: Sat, 8 Feb 2025 19:35:23 +0800 [thread overview]
Message-ID: <20250208113525.2055-1-hdanton@sina.com> (raw)
In-Reply-To: <67a6e55f.050a0220.3d72c.001f.GAE@google.com>
On Fri, 07 Feb 2025 21:02:23 -0800
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: 7ee983c850b4 Merge tag 'drm-fixes-2025-02-08' of https://g..
> git tree: upstream
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17148bdf980000
#syz test
--- x/net/netrom/nr_route.c
+++ y/net/netrom/nr_route.c
@@ -100,6 +100,7 @@ static int __must_check nr_add_node(ax25
{
struct nr_node *nr_node;
struct nr_neigh *nr_neigh;
+ struct nr_neigh *victim = NULL;
int i, found;
struct net_device *odev;
@@ -245,8 +246,9 @@ static int __must_check nr_add_node(ax25
nr_node->routes[2].neighbour->count--;
nr_neigh_put(nr_node->routes[2].neighbour);
- if (nr_node->routes[2].neighbour->count == 0 && !nr_node->routes[2].neighbour->locked)
- nr_remove_neigh(nr_node->routes[2].neighbour);
+ if (nr_node->routes[2].neighbour->count == 0 &&
+ !nr_node->routes[2].neighbour->locked)
+ victim = nr_node->routes[2].neighbour;
nr_node->routes[2].quality = quality;
nr_node->routes[2].obs_count = obs_count;
@@ -281,6 +283,8 @@ static int __must_check nr_add_node(ax25
nr_neigh_put(nr_neigh);
nr_node_unlock(nr_node);
+ if (victim)
+ nr_remove_neigh(victim);
nr_node_put(nr_node);
return 0;
}
--
next prev parent reply other threads:[~2025-02-08 11:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-30 2:36 [syzbot] [hams?] possible deadlock in nr_remove_neigh (2) syzbot
2025-02-08 5:02 ` syzbot
2025-02-08 11:35 ` Hillf Danton [this message]
2025-02-08 12:06 ` syzbot
2025-02-08 23:45 ` Hillf Danton
2025-02-09 0:51 ` syzbot
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=20250208113525.2055-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+8863ad36d31449b4dc17@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