Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2415480ioo; Sat, 28 May 2022 12:54:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFx9wiKw1CUYMQZ8YvNOYGrumFxBb6mpQrEi4uchGGbB5E9GL3/bDj4dBR/GiHnaBZF85T X-Received: by 2002:a05:6a00:10cc:b0:505:ada6:e03e with SMTP id d12-20020a056a0010cc00b00505ada6e03emr49892148pfu.45.1653767642229; Sat, 28 May 2022 12:54:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653767642; cv=none; d=google.com; s=arc-20160816; b=pLUlCnd7/f4kuLujIrEVJrI1B1RA3bDWLW3yIGsuCynCoruCdYFU4Dkrj8zfEBY2IK vT7++KoRTfOEyjFxkr9TEuUAYdBV1xTCN/16bGkq2CVeam12HyyB+DKF3HpB4AbP71u8 3WhNyzyh/8IbuXs6WfyW7gp42fHfoFyZUyCWvzaVo623ltWueQs3qDmtS8PcgJy6TFhm QSdE4X/5dhMhN4kGfnOWcTbpQ6n5dD+Vanq8RyO2DVW08HOcPtK28Z6yoMa2q6l+UCg1 jI8hfTlo46zGGftKB6kIlsWcmTpZxVP5mbTXowDWEY8VBqC9ovyNXbEM1C7XAzidzGuH kluw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BvyofWVL6PxZ+qBPnC+rj6+dTE1nHCwUFth2D5+/9sI=; b=Z3P42lUspEOVaL0799EoLb7qceTA1YbiA3W3TyDrZDmwQweynvSi8F12I7A2S529b5 l4Yyc2tRv/lBNlH48nzeDS+B5ik348bxzSAj4DZcFa6Kc3CyiJihjWs5sIsDfP/hm08A F92h+4M+UPHW5Rio07ac8JXbfXuesLne9eMQzzO6qeXtsTwlIlj/A7GjNXhomOda4ene v2bGttZqq7jJWgipkHOHvLEB4DVEjeQW0PUZmpVD72EEgJE+tNmaPW6i4pYi7bKJoDJa acWRu9LINNUIVdPNDUrpqcTQFjwm/TZmref9iwwDSKn+Ek3IRql7NsY+CjOhOS+aRhvt eITA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OxJBxufp; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id bj3-20020a170902850300b00163724c3d97si8655301plb.564.2022.05.28.12.54.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 12:54:02 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OxJBxufp; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 93B1B457A7; Sat, 28 May 2022 12:14:06 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235056AbiE1MIy (ORCPT + 99 others); Sat, 28 May 2022 08:08:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229685AbiE1MIv (ORCPT ); Sat, 28 May 2022 08:08:51 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F11C91A80A; Sat, 28 May 2022 05:08:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B04D1B816EA; Sat, 28 May 2022 12:08:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17AE3C34100; Sat, 28 May 2022 12:08:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1653739727; bh=l7QuoL+ncgWhP6611WfWzxqo9yTpWKNWP7/SwKFgPtE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OxJBxufpf777F2RMiYltTVATTJQHMLmO/pgDN/S1W8IvdREyaUM276fJA38bErvfG IWT7zMKdSvF05TUIIR+YjycB+cAuQvJ+Gn6kSIYv3oZSRAgal7JukXdpwSCR5by6Bj qBrAJZnNPJVr36jOS83zeMussxWqMQ1UD4o62k/o= Date: Sat, 28 May 2022 14:08:44 +0200 From: Greg KH To: Alan Stern Cc: syzbot , andreyknvl@gmail.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] WARNING in driver_unregister Message-ID: References: <000000000000f9e65705e003513a@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 27, 2022 at 05:36:51PM -0400, Alan Stern wrote: > On Fri, May 27, 2022 at 12:29:08PM -0700, syzbot wrote: > > Hello, > > > > syzbot has tested the proposed patch but the reproducer is still triggering an issue: > > WARNING in sysfs_create_file_ns > > > > really_probe: driver_sysfs_add(gadget.0) failed > > ------------[ cut here ]------------ > > WARNING: CPU: 0 PID: 2361 at fs/sysfs/file.c:351 sysfs_create_file_ns+0x131/0x1c0 fs/sysfs/file.c:351 > > Modules linked in: > > CPU: 0 PID: 2361 Comm: syz-executor.0 Not tainted 5.18.0-rc5-syzkaller-00157-g97fa5887cf28-dirty #0 > > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 > > RIP: 0010:sysfs_create_file_ns+0x131/0x1c0 fs/sysfs/file.c:351 > > Code: e9 03 80 3c 01 00 75 7f 8b 4c 24 38 4d 89 e9 48 89 ee 48 8b 7b 30 44 8b 44 24 48 e8 e9 fa ff ff 41 89 c5 eb 0d e8 cf 7c 9d ff <0f> 0b 41 bd ea ff ff ff e8 c2 7c 9d ff 48 b8 00 00 00 00 00 fc ff > > RSP: 0018:ffffc900028ffca0 EFLAGS: 00010293 > > Here's some extra detail, taken from the console log: > > [ 98.336685][ T2361] really_probe: driver_sysfs_add(gadget.0) failed > [ 98.336836][ T2360] sysfs: cannot create duplicate filename '/bus/gadget/drivers/dummy_udc' > [ 98.343498][ T2361] ------------[ cut here ]------------ > [ 98.352154][ T2360] CPU: 1 PID: 2360 Comm: syz-executor.0 Not tainted 5.18.0-rc5-syzkaller-00157-g97fa5887cf28-dirty #0 > [ 98.357802][ T2361] WARNING: CPU: 0 PID: 2361 at fs/sysfs/file.c:351 sysfs_create_file_ns+0x131/0x1c0 > > Simultaneous splats from two different threads trying to add drivers with > the same name suggests there might be a concurrency bug in the sysfs > filesystem. This sort of thing should be an error but it shouldn't bring > the kernel to its knees. It's not bringing anything down, it's just giving you a big fat warning that the developer did something wrong and it should be fixed. The kernel should keep working just fine after this. > Greg, do you know anyone who could take a look at this? I don't know much > about sysfs. It's not a sysfs thing, it's a "we should not register the same driver name multiple times" thing, so that subsystem needs to be fixed to make this always a unique name. thanks, greg k-h