From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp134-25.sina.com.cn (smtp134-25.sina.com.cn [180.149.134.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B721B1BEF7C for ; Fri, 24 Jan 2025 11:18:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=180.149.134.25 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737717524; cv=none; b=b/VAeYeTd5NZHqHw1OBqyEWPVL+J7lhgKr9eZoAByhaNU3svjO3uwV1JnrmzXjeMETyMnKckQqhDSyRDq48JzKUoPmKiA4jQVo60WbegWWEl7MEly7pk+TA1epYp4uj4OtPhn9Qesvz6s0t7EXTXN0KvY/3N2MLug2FxnBrYe6k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737717524; c=relaxed/simple; bh=kqLHaa8NQQCOzVlFW435Vqqb/HlGgxKZCzcfdocfiVo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dxM7MsiE1lHUbuCUm3eOYeS/x9zllXaLiqvCjJ6yT90TJx2NGLmjH05gnHTRApIfbBjGXCeurAR7t8jJwuvVgNtoGeB5pjfwP0Lw0U1tiL9wWm4jJwzk7ZU4rgfiK3vZ5jEWkgE3cilZXQI478maGy5c94ooLUdZBusFT5L91iE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; arc=none smtp.client-ip=180.149.134.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([113.88.49.166]) by sina.com (10.185.250.21) with ESMTP id 679376DE00000B74; Fri, 24 Jan 2025 19:17:55 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 1010523408365 X-SMAIL-UIID: 7594587F89BB4CB98823B61DB21709EB-20250124-191755-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [usb?] general protection fault in status_show Date: Fri, 24 Jan 2025 19:17:43 +0800 Message-ID: <20250124111744.1807-1-hdanton@sina.com> In-Reply-To: <6789f53f.050a0220.20d369.0054.GAE@google.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Thu, 16 Jan 2025 22:14:23 -0800 > syzbot found the following issue on: > > HEAD commit: be548645527a Merge tag 'for-linus' of git://git.kernel.org.. > git tree: upstream > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12d51cb0580000 #syz test upstream master --- x/drivers/usb/usbip/vhci_sysfs.c +++ y/drivers/usb/usbip/vhci_sysfs.c @@ -76,6 +76,8 @@ static ssize_t status_show_vhci(int pdev } hcd = platform_get_drvdata(pdev); + if (!usb_hcd_is_primary_hcd(hcd)) + return 0; vhci_hcd = hcd_to_vhci_hcd(hcd); vhci = vhci_hcd->vhci; --- x/net/core/dev.c +++ y/net/core/dev.c @@ -10260,14 +10260,19 @@ static bool from_cleanup_net(void) #endif } +static unsigned long extra_netdev_locks = 1; static void rtnl_drop_if_cleanup_net(void) { + if (extra_netdev_locks) + return; if (from_cleanup_net()) __rtnl_unlock(); } static void rtnl_acquire_if_cleanup_net(void) { + if (extra_netdev_locks) + return; if (from_cleanup_net()) rtnl_lock(); } --