public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+9d95beb2a3c260622518@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem
Date: Wed, 20 Mar 2024 18:32:24 +0800	[thread overview]
Message-ID: <20240320103224.2123-1-hdanton@sina.com> (raw)
In-Reply-To: <000000000000adb08b061413919e@google.com>

On Wed, 20 Mar 2024 01:42:21 -0700
> syzbot found the following issue on:
> 
> HEAD commit:    32fa4366cc4d net: phy: fix phy_read_poll_timeout argument ..
> git tree:       net
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1676fc6e180000

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git  32fa4366cc4d

--- x/kernel/bpf/lpm_trie.c
+++ y/kernel/bpf/lpm_trie.c
@@ -321,7 +321,7 @@ static long trie_update_elem(struct bpf_
 	if (key->prefixlen > trie->max_prefixlen)
 		return -EINVAL;
 
-	spin_lock_irqsave(&trie->lock, irq_flags);
+	spin_lock_irqsave_nested(&trie->lock, irq_flags, 1);
 
 	/* Allocate and fill a new node */
 
@@ -448,7 +448,7 @@ static long trie_delete_elem(struct bpf_
 	if (key->prefixlen > trie->max_prefixlen)
 		return -EINVAL;
 
-	spin_lock_irqsave(&trie->lock, irq_flags);
+	spin_lock_irqsave_nested(&trie->lock, irq_flags, 2);
 
 	/* Walk the tree looking for an exact key/length match and keeping
 	 * track of the path we traverse.  We will need to know the node
--

  reply	other threads:[~2024-03-20 10:32 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20  8:42 [syzbot] [bpf?] possible deadlock in trie_delete_elem syzbot
2024-03-20 10:32 ` Hillf Danton [this message]
2024-03-20 19:42   ` syzbot
2024-03-20 14:20 ` syzbot
2024-06-05  7:16 ` [syzbot] Re: 000000000000fcfa6406141cc8ac@google.com syzbot
2024-06-05  7:22 ` [syzbot] Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem syzbot
2024-06-05  7:25 ` [syzbot] Re: 000000000000fcfa6406141cc8ac@google.com syzbot
2024-06-05  8:07 ` syzbot
2024-06-06  8:57 ` syzbot
2024-06-06 11:29 ` syzbot
2024-06-06 12:03 ` syzbot
2024-06-06 12:14 ` syzbot
2024-06-06 13:05 ` syzbot
2024-06-06 13:13 ` syzbot
2024-06-06 13:24 ` syzbot
2024-06-06 13:27 ` [syzbot] possible deadlock in trie_delete_elem syzbot
2024-06-06 13:51 ` syzbot
2024-06-06 14:04 ` syzbot
2024-06-06 14:14 ` syzbot
2024-06-06 20:34   ` kernel test robot
2024-06-06 21:05   ` kernel test robot
2024-06-07  7:17 ` [syzbot] Re: 000000000000fcfa6406141cc8ac@google.com syzbot
2025-05-08  7:13 ` [syzbot] [bpf?] possible deadlock in trie_delete_elem syzbot
2025-05-08 18:00   ` Alexei Starovoitov
2025-05-08 23:39   ` Kumar Kartikeya Dwivedi
     [not found] <PN2PR01MB489171CD7B0E226F8256C23DFCF92@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-05  7:17 ` syzbot
     [not found] <PN2PR01MB489119119088A1E7091BB6B9FCF92@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-05  7:39 ` syzbot
     [not found] <PN2PR01MB4891734D357ACCDDD106F360FCF92@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-05  7:57 ` syzbot
     [not found] <PN2PR01MB4891BF795360AE31E349CFECFCF92@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-05  8:24 ` syzbot
     [not found] <PN2PR01MB4891AE31D63427B828C79ECBFCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-06  9:27 ` syzbot
     [not found] <PN2PR01MB48911035081582F4B9893F9FFCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-06 11:47 ` syzbot
     [not found] <PN2PR01MB489190072C2A23C3C1CCCE2FFCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-06 12:12 ` syzbot
     [not found] <PN2PR01MB489159F2619858474EF92FC5FCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-06 12:32 ` syzbot
     [not found] <PN2PR01MB4891F53CC6107BBDB25C8C09FCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-06 13:10 ` syzbot
     [not found] <PN2PR01MB489146FC0041ED737236BE64FCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-06 13:17 ` syzbot
     [not found] <PN2PR01MB4891DFF0F26C14B0A7ED225EFCFA2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-06 13:39 ` syzbot
     [not found] <MAXPR01MB316750CFC54579A6A384FF91F7FA2@MAXPR01MB3167.INDPRD01.PROD.OUTLOOK.COM>
2024-06-06 13:40 ` syzbot
     [not found] <20240606135139.134172-1-norkam41@gmail.com>
2024-06-06 13:55 ` syzbot
     [not found] <20240606140352.135948-1-norkam41@gmail.com>
2024-06-06 14:26 ` syzbot
     [not found] <20240606141413.137516-1-norkam41@gmail.com>
2024-06-06 14:38 ` syzbot
     [not found] <PN2PR01MB4891E7B8CF9B3C1531CB9ADEFCFB2@PN2PR01MB4891.INDPRD01.PROD.OUTLOOK.COM>
2024-06-07  7:45 ` 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=20240320103224.2123-1-hdanton@sina.com \
    --to=hdanton@sina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+9d95beb2a3c260622518@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