Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp466803lqd; Wed, 24 Apr 2024 07:44:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVB9opabSQLi2Y9fgLMmg1e1is7iISltLo/n0TCjXXoD65wlTLClFIAUP52u0S1V3oDj5j94aK8uOqtYB2ON8s0SDwR8bBYVTh6JT2QUA== X-Google-Smtp-Source: AGHT+IExuBMJ+fDfXMqXGeRE8Axbp787Vp688fmwcpM5s4yKV7hJA2nUzts45i9gP1RTKY9nXEXU X-Received: by 2002:a05:6358:1905:b0:186:ea4:b1a3 with SMTP id w5-20020a056358190500b001860ea4b1a3mr2628015rwm.32.1713969857517; Wed, 24 Apr 2024 07:44:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713969857; cv=pass; d=google.com; s=arc-20160816; b=t7RobFhUOFvNX50ki/pBMiGkYUGRZRN6MzP6FWUr4Bht+NJOX1ipwFMKXvFtX21vGA JEosVFb76n7ZRxLN6b+bnR/iFs/xZQ1gr3Ar0S0/nW/fA0oQoYXB2iusy0rgQX69RW4e KW03JEShm3l/IUG5N2JRd+RzzFaEEzwW7M3rYMcskHx+YQKy/3ZGOdXKc5YXT6DG2vAn DYkgCqu29/EaOkE/mU9OqERz/AjTrVsTMM76QeatpNZmSbwMV64HVUnO9f9W1vIC1Cgz SeGnarq3DfU+GWYuEZSl6r8K84MNfNG6roZ1P58wpkZMro0mgE+/SsVwEPkCoRAWvImP oiBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=7HvyDwLrdYlbXszT68jijcl5zFtZUsqyFmYOqjxqKKs=; fh=x1e8SN8Suotno9mlCGRWy2qR43FrlFMcbIRP8piwx2s=; b=bL2ofg6Fyxc/ff9LroqyOoFR4Vc1BwlYTLLvaOIDGMmMVXGGsa8cRKM1PgMaJPpSmr 4E6mQ+SYlsCOgpvzt+od6OGORtSZD9D2DZrkauOVCxpmy5rQjRsYLpKtbcsGqgK7/k7O xa3skRCgkpPVJELkYP32Ec8JikA4hIwqEDkcXB2C+z2t37ICE8pKgoUxG1/BEvtc6BQz hbC3VFJnpo+2zkqT9S7RcMajlKratUqnHW0y7rSSTdGcTn3gnimqMetSRqV86WWxV3vE LSF/SHATn1b009NpZKZ+OzdPtztxt2gJVIUmvuqxUBYfZnDrYWRdvCI+3jE7Il8bxSge jnmA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@resnulli-us.20230601.gappssmtp.com header.s=20230601 header.b=plxLhGtM; arc=pass (i=1 dkim=pass dkdomain=resnulli-us.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-157107-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157107-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x20-20020ac85f14000000b00434b4902949si15126343qta.774.2024.04.24.07.44.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 07:44:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157107-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@resnulli-us.20230601.gappssmtp.com header.s=20230601 header.b=plxLhGtM; arc=pass (i=1 dkim=pass dkdomain=resnulli-us.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-157107-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157107-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 393641C24635 for ; Wed, 24 Apr 2024 14:44:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CB81115ECE0; Wed, 24 Apr 2024 14:44:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20230601.gappssmtp.com header.i=@resnulli-us.20230601.gappssmtp.com header.b="plxLhGtM" Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9811E142E7C for ; Wed, 24 Apr 2024 14:44:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713969848; cv=none; b=r4uiDmzkWrlOAW+q3B7ixoUgsqlw4fg5SkFfZeYlc9iZ+m0E2HnxIHqzV+bEiROnvDgNg3lH3UyF03wgLtR5qB/nATnReiGGbJYKircwmGorEvWJNwkoIV40ZEvavF8dRteoPjubTbVLeBpN9ms/yA6vzuiaY0qu0oFN26Mii8g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713969848; c=relaxed/simple; bh=7HvyDwLrdYlbXszT68jijcl5zFtZUsqyFmYOqjxqKKs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=g0hu6rV6XNwluYQ7GgUGJLRhjDxu+VyikounIE1ORhFVl0KrR5DMRL1zePclpFJI68ivuary8V0mhWwO5TnRkhGOu6Uzhw9wJasDO9nWdk1/ggVjibSS6ZuRcnaoqMXJbCFUURsKvc8Pna2oVNKYKdKSz/EaluZIxXcwHALVbDk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=resnulli.us; spf=none smtp.mailfrom=resnulli.us; dkim=pass (2048-bit key) header.d=resnulli-us.20230601.gappssmtp.com header.i=@resnulli-us.20230601.gappssmtp.com header.b=plxLhGtM; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=resnulli.us Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=resnulli.us Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-41aa2f6ff2dso18976745e9.3 for ; Wed, 24 Apr 2024 07:44:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20230601.gappssmtp.com; s=20230601; t=1713969845; x=1714574645; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=7HvyDwLrdYlbXszT68jijcl5zFtZUsqyFmYOqjxqKKs=; b=plxLhGtMNAD5+qqCbAwZNOGE75DajRqdHa0LB2Cs9OjsDp5EOzPjUux0V6xpYlBw4o xcMqonqDMrBAv3EAH4iY5vobxMuv6aORoQ/edaEf2/tgjE0erLDri0Sx3+YpbyFClSxx tuhbS81qkv7MnVbqUEOZx9gNOsbvcFJ6Oqt8hl6DGU+epuRZeLPY4MIB6TM/nIT6ogZM xxMQnoo+g0Ipam8/2D3woA5egTd9h6h+cE3fYitOoB7662Vml901LXHi5VbBB9723DCB T0IoBXLl/z+NkI3GvDgAQYz7DBVlKshVzeX09YnezTh72iAv1PWs78r8EAJAr7QOR8ps 0DLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713969845; x=1714574645; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=7HvyDwLrdYlbXszT68jijcl5zFtZUsqyFmYOqjxqKKs=; b=ALIJTDu1+ZXtm1DuFErL+busGS+qYKsbU8coB3u3hphMwzfvUAQalOgjA+ijR8qulW g+kOijQLrCMoi6q+nNOeZuR7TYcHBbeyaNzBZnPZselFnFEbDAOjOdlR4PZV4pVp9EB0 d1TsF7yBUcx+d8Zv5bYggFcp0IsvL7k/vGuFDZ7TOU3x50JGChiKAqGiiEPPAzlOkUDA jNsXWG2R66x1/waXomRvY5S2HWnB+AIFr5EqnQqSQXyYUZt9+L0a1abkOxuC+XdOPtS4 Kgk+1/1YPLB26BAW9NpHxFDY/zXaqj5kiIa+68WTT0aUH95FCYbpFg1gS6UBGNn9jQle GZlw== X-Forwarded-Encrypted: i=1; AJvYcCW1dSybO5/7W8N8z/EULu9NWZJ1C9HOjtXgFVyo4snxbiDZqDo0rYh35RvDHA/RsVDlo/f1I0A6gNGdc1pG7VnSuf5mCST4n4IZkz9Q X-Gm-Message-State: AOJu0Yyx0M37juWSYYLj/b8kmlkYd2nC2tY1/SxzJZyFeWj5C1XNqw4y Dh5uVG2r0+hZBh6chrTqn+vk64C3Julrx/CScxmmWUWs2E+AQZlysX1zz+JvLeA= X-Received: by 2002:a05:6000:e42:b0:343:ab0f:4dd6 with SMTP id dy2-20020a0560000e4200b00343ab0f4dd6mr1819768wrb.33.1713969844797; Wed, 24 Apr 2024 07:44:04 -0700 (PDT) Received: from localhost ([193.47.165.251]) by smtp.gmail.com with ESMTPSA id h17-20020a5d6891000000b0034a51f86086sm14709553wru.63.2024.04.24.07.44.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 07:44:04 -0700 (PDT) Date: Wed, 24 Apr 2024 16:44:00 +0200 From: Jiri Pirko To: Arkadiusz Kubalewski Cc: netdev@vger.kernel.org, vadim.fedorenko@linux.dev, davem@davemloft.net, rrameshbabu@nvidia.com, linux-kernel@vger.kernel.org, pabeni@redhat.com, kuba@kernel.org, mschmidt@redhat.com Subject: Re: [PATCH net v2] dpll: fix dpll_pin_on_pin_register() for multiple parent pins Message-ID: References: <20240424101636.1491424-1-arkadiusz.kubalewski@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240424101636.1491424-1-arkadiusz.kubalewski@intel.com> Wed, Apr 24, 2024 at 12:16:36PM CEST, arkadiusz.kubalewski@intel.com wrote: >In scenario where pin is registered with multiple parent pins via >dpll_pin_on_pin_register(..), all belonging to the same dpll device. >A second call to dpll_pin_on_pin_unregister(..) would cause a call trace, >as it tries to use already released registration resources (due to fix >introduced in b446631f355e). In this scenario pin was registered twice, >so resources are not yet expected to be release until each registered >pin/pin pair is unregistered. > >Currently, the following crash/call trace is produced when ice driver is >removed on the system with installed E810T NIC which includes dpll device: > >WARNING: CPU: 51 PID: 9155 at drivers/dpll/dpll_core.c:809 dpll_pin_ops+0x20/0x30 >RIP: 0010:dpll_pin_ops+0x20/0x30 >Call Trace: > ? __warn+0x7f/0x130 > ? dpll_pin_ops+0x20/0x30 > dpll_msg_add_pin_freq+0x37/0x1d0 > dpll_cmd_pin_get_one+0x1c0/0x400 > ? __nlmsg_put+0x63/0x80 > dpll_pin_event_send+0x93/0x140 > dpll_pin_on_pin_unregister+0x3f/0x100 > ice_dpll_deinit_pins+0xa1/0x230 [ice] > ice_remove+0xf1/0x210 [ice] > >Fix by adding a parent pointer as a cookie when creating a registration, >also when searching for it. For the regular pins pass NULL, this allows to >create separated registration for each parent the pin is registered with. > >Fixes: b446631f355e ("dpll: fix dpll_xa_ref_*_del() for multiple registrations") >Signed-off-by: Arkadiusz Kubalewski Reviewed-by: Jiri Pirko Thanks!