Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp756821pxb; Fri, 22 Apr 2022 10:29:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLCB9++ej9WVcjcp8ysKBBe1OChnwnGJCojjuYj3K2ZzZvRIRDexCo4RY3EVvVmZu3cRQN X-Received: by 2002:a17:903:4052:b0:156:229d:ffed with SMTP id n18-20020a170903405200b00156229dffedmr5609434pla.98.1650648566797; Fri, 22 Apr 2022 10:29:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650648566; cv=none; d=google.com; s=arc-20160816; b=ekYFdGcih6CijWZ++RNwoguz9yE2TpH5/xwONfswjhqklAqfwR9Q/SEiTuxnTDNB8Y eNSpbQHsL6PT/c0gsamNaOfUej7H2XTj5o2k372kjTMJMQbEWS1A19Py+I0Ly3ezNT3B F8O9HX8GSq5o/TmtngKed8ihd2VXHyxnQUnhoupqjsymgkMUs+hsk7HH2KgZtBColSTT dwjLR7QrQgdevu5kWDsuVzNOzAwOuqIkH1YpDO73YbrRqnrhLeSB0Y3w8WhadljmjvWm y9+kVh76juiRmrevijEtXhN+bPhhbsdM8eM8Qb7Pwe5RC0cNecT4a5eCUA2oZXf7PJ8M kGeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=TvwZYEzGE28eFsMv32GXOw2P+ELmPfx1FLDUwPNPBUQ=; b=J1bUyNaO9gMnuLtuRq4MZtSnZXaTLFTnL2min24avrKM5Q/b7x90P6TOLAkxv/cZ2/ ist5X8oJK085K1y0zpYEtxOy4XDJ5j/1/Zkkdwg/Eat+MdM+duBCRj+owYDDz9Xmq6XS lyRmIz0BOabUt5cd7mJfF657RuCXULUvL7Ke9clrV3kD4NtsOHx30n0rzAg+3sxMFKNF 3uT8dOCHbFVcCr/5MB6J82R2vvU6xbnQbk27dpMhwhbZp93Rg3AJBf8CO6X3c4xJSr5d L/f5G5qTAKBnsBiWLVoaH2GR4CA53vkaEs9Fzql4t+e+oigXz6a+RGn5dmq4V7/etoiC Hn7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PnpGvvHw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t34-20020a632262000000b003aad07d8487si1697249pgm.60.2022.04.22.10.29.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 10:29:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PnpGvvHw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DE396C9B5A; Fri, 22 Apr 2022 10:22:34 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384660AbiDUGLs (ORCPT + 99 others); Thu, 21 Apr 2022 02:11:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355176AbiDUGLr (ORCPT ); Thu, 21 Apr 2022 02:11:47 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 45D9310FE9 for ; Wed, 20 Apr 2022 23:08:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650521338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TvwZYEzGE28eFsMv32GXOw2P+ELmPfx1FLDUwPNPBUQ=; b=PnpGvvHwO3t0ckm5/44GSVNesvsBHYQX89q1NbzljE9I5IwLHyaRrJQYg4h7+RA8urRgpU Utz8mvbxEpZa+wbe8fOcdUwYhed1f6xFeGrVjVhpjz9NJ271My8dRgu4jeOdgHGY7cFPdb UhHFV23nQVWwTovBrycrxZS5ETQ2LV0= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-433-cVR6gPhKOiKhLOalCY4_Ew-1; Thu, 21 Apr 2022 02:08:53 -0400 X-MC-Unique: cVR6gPhKOiKhLOalCY4_Ew-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 731023806650; Thu, 21 Apr 2022 06:08:52 +0000 (UTC) Received: from ceranb (unknown [10.40.194.169]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7490B2024CB7; Thu, 21 Apr 2022 06:08:49 +0000 (UTC) Date: Thu, 21 Apr 2022 08:08:48 +0200 From: Ivan Vecera To: Leon Romanovsky Cc: netdev@vger.kernel.org, poros@redhat.com, mschmidt@redhat.com, Jesse Brandeburg , Tony Nguyen , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Dave Ertman , Shiraz Saleem , "moderated list:INTEL ETHERNET DRIVERS" , open list Subject: Re: [PATCH net v2] ice: Fix race during aux device (un)plugging Message-ID: <20220421080848.41bed123@ceranb> In-Reply-To: References: <20220420150300.1062689-1-ivecera@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Spam-Status: No, score=-2.5 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 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 Thu, 21 Apr 2022 08:12:58 +0300 Leon Romanovsky wrote: > > static struct iidc_auxiliary_drv *ice_get_auxiliary_drv(struct ice_pf *pf) > > { > > struct auxiliary_device *adev; > > > > + BUG_ON(!mutex_is_locked(&pf->adev_mutex)); > > Please don't add BUG_ON() in driver code. > > I think that you are looking for lockdep_assert_held(&pf->adev_mutex). Will fix. I.