Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2986611lqo; Tue, 14 May 2024 16:23:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVNKYfqvrtYkW7ujvEUji6OSMqr61iUoZBiJN0q+IUkvmVBwf8m+AIJHEdIBgHK54vfz86BV+n/uJZYg4SCLK/PmNY9hm6Ct1rEgtix2A== X-Google-Smtp-Source: AGHT+IFV7DOFYjzKWXK7QSGQ8NKxhCgmetZX6/+sr6SGWWmKFy2iixOCN3Ddf7ubEIIPnJPeLBLk X-Received: by 2002:a05:6a21:394b:b0:1b0:14a0:c875 with SMTP id adf61e73a8af0-1b014a0cde5mr2583018637.1.1715729035106; Tue, 14 May 2024 16:23:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715729035; cv=pass; d=google.com; s=arc-20160816; b=ZSfKkER+z2j+Ol47GwuuMNpsmjJ/xfXR38WPzMdhtfSNuWzuO8eH1KM3JG6jRVRQpp lPDEbhhTKDV3hD1cGYTO6A4hHofEViPgC8I1IgNbjSFQiArWf9Ri7rECn0g1A8hdBhB6 q+YTOMXwrkYKPC3BdOIkZJOltY2Jq7fCxUOgqmc+ChJM0iEPDNyPXK3fJvxq8TfNcANZ W+zFCqkKr+b2Ymb2bltBfr/SMhzRk47MVvXmu/SPnPnNJOJSpXXWR7Fr4DyJhXtzM6/F ClBO8+ojhFUoO5dJBRKUN8qoRJDS1ILz0DH7d7IZJF9Swbep0e/J9cKtqHOLuau6N4S7 VKOA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=2mdG5bFJT9pQPplJ6oncgG0FPjZOXSpLBDmJdLPBGAQ=; fh=ppZhcCZkR0niMATzqSPq1FOnrEbFbFztyeiR2aD9HII=; b=uc18hTcgN/5DBU1Sl8UcZzCd+5uGy4cmKjAwGNja253UWiJj+7zoOZ+TWOwxBIdVnH Vkspfk6TxZ/o4u6nLoefykuGitygB6GapQFoom7GNPBlth/orcA2LOzfneY2Uniuq6Mn s+WDcH4vJgtDaHBAgslPaZcpaVGSA6iv0/fBkCghkp+L9qPL8FSTqgIs6sk5bfYaGK3m US6BbfvjgVm4M+btAFMpaoIraES9DiuI8TBBu1AY8xL7/PysVB495ofU+mwXiW6J9NQe 8+k0q+sQHXNxFbBxH1UGGQ/8jPAwue6zpWnxXTNT5R9PAa48xiaCSO3nr8PCvniJLq77 0Eyg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-179258-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179258-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2a918aasi12311820b3a.101.2024.05.14.16.23.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 16:23:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179258-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-179258-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179258-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B57DC28196F for ; Tue, 14 May 2024 23:23:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 369A0182C9F; Tue, 14 May 2024 23:23:48 +0000 (UTC) Received: from mail78-59.sinamail.sina.com.cn (mail78-59.sinamail.sina.com.cn [219.142.78.59]) (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 9D1EB17F387 for ; Tue, 14 May 2024 23:23:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=219.142.78.59 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715729027; cv=none; b=FFsnN/6lEb2NpoXIf9bYxMN0+8WloOQHk7m3lqiH0M9EI114BZZ0pYVR+pMxP966aAZSvG8UAzTss2b+yGug4sGAAS+xQq5Hi5tshxG7uH8YI6osKGMqhjgtEj4Tez5Yeu5ALRH0LP6/MtNeNxo825Xy2s6hmU/e32B5/PcBCWs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715729027; c=relaxed/simple; bh=E/+FvuS49WZ8xLGNg0sPFrJl+qyl+4ZKrTgtjh3LYMc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Dj8dxf3TTdxul1u3FWfCW3Ddsm09xZRH1VAS0pqV1DhyZOU7MXQnJdR5R8oHtqyy0ED65BRzPfrK6q62o/XCOKFexHmkgIGdm6PBuA1I575wCeMreeWo5BZHVXf7X8SZHkrn4y+CVLfUoPLhKzPi+lACdo3aK1Hxk7NPwmi7zqs= 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=219.142.78.59 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.48.224]) by sina.com (172.16.235.25) with ESMTP id 6643F2720000638A; Tue, 15 May 2024 07:23:32 +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: 7550634210254 X-SMAIL-UIID: 6371BC7211E04BC4A02C5D589C930A86-20240515-072332-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [kernfs?] [usb?] WARNING in kernfs_get (5) Date: Wed, 15 May 2024 07:23:19 +0800 Message-Id: <20240514232319.3252-1-hdanton@sina.com> In-Reply-To: <0000000000007224f506186be18b@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 Tue, 14 May 2024 08:44:43 -0700 > syzbot has found a reproducer for the following issue on: > > HEAD commit: 26dd54d03cd9 Add linux-next specific files for 20240514 > git tree: linux-next > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14b06900980000 #syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 26dd54d03cd9 --- l/drivers/base/firmware_loader/fallback.c +++ f/drivers/base/firmware_loader/fallback.c @@ -83,15 +83,15 @@ static int fw_load_sysfs_fallback(struct dev_set_uevent_suppress(f_dev, true); + mutex_lock(&fw_lock); + retval = device_add(f_dev); if (retval) { dev_err(f_dev, "%s: device_register failed\n", __func__); goto err_put_dev; } - mutex_lock(&fw_lock); if (fw_load_abort_all || fw_state_is_aborted(fw_priv)) { - mutex_unlock(&fw_lock); retval = -EINTR; goto out; } @@ -120,10 +120,12 @@ static int fw_load_sysfs_fallback(struct } else if (fw_priv->is_paged_buf && !fw_priv->data) retval = -ENOMEM; + mutex_lock(&fw_lock); out: device_del(f_dev); err_put_dev: put_device(f_dev); + mutex_unlock(&fw_lock); return retval; } --