mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+ca9ad1d31885c81155b6@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [net?] WARNING: suspicious RCU usage in dev_deactivate_queue
Date: Thu, 18 Jul 2024 18:52:48 +0800	[thread overview]
Message-ID: <20240718105248.1380-1-hdanton@sina.com> (raw)
In-Reply-To: <000000000000c2f7f2061d7bfb12@google.com>

On Wed, 17 Jul 2024 19:03:22 -0700
> syzbot found the following issue on:
> 
> HEAD commit:    51835949dda3 Merge tag 'net-next-6.11' of git://git.kernel..
> git tree:       upstream
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=170b4f31980000

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git  523b23f0bee3

--- x/net/ethtool/ioctl.c
+++ y/net/ethtool/ioctl.c
@@ -58,10 +58,11 @@ static struct devlink *netdev_to_devlink
 
 u32 ethtool_op_get_link(struct net_device *dev)
 {
-	/* Synchronize carrier state with link watch, see also rtnl_getlink() */
-	linkwatch_sync_dev(dev);
+	u32 rc = netif_carrier_ok(dev) ? 1 : 0;
 
-	return netif_carrier_ok(dev) ? 1 : 0;
+	linkwatch_fire_event(NULL);
+
+	return rc;
 }
 EXPORT_SYMBOL(ethtool_op_get_link);
 
--- x/net/core/link_watch.c
+++ y/net/core/link_watch.c
@@ -286,13 +286,17 @@ static void linkwatch_event(struct work_
 
 void linkwatch_fire_event(struct net_device *dev)
 {
-	bool urgent = linkwatch_urgent_event(dev);
+	bool urgent = true;
 
+	if (!dev)
+		goto sched;
+	urgent = linkwatch_urgent_event(dev);
 	if (!test_and_set_bit(__LINK_STATE_LINKWATCH_PENDING, &dev->state)) {
 		linkwatch_add_event(dev);
 	} else if (!urgent)
 		return;
 
+sched:
 	linkwatch_schedule_work(urgent);
 }
 EXPORT_SYMBOL(linkwatch_fire_event);
--

  reply	other threads:[~2024-07-18 10:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-18  2:03 syzbot
2024-07-18 10:52 ` Hillf Danton [this message]
2024-07-18 11:36   ` 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=20240718105248.1380-1-hdanton@sina.com \
    --to=hdanton@sina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+ca9ad1d31885c81155b6@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®