Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4694847pxu; Tue, 13 Oct 2020 05:08:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymOf8jAqbhvUiQr2F3OpCnqPf+yoRDWC9oMbnB+pVihBMrSrHwMmc9bWqJt93uBiC6cWTN X-Received: by 2002:a1c:dd85:: with SMTP id u127mr15617586wmg.33.1602590919789; Tue, 13 Oct 2020 05:08:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602590919; cv=none; d=google.com; s=arc-20160816; b=znhxdZwFaIb86Sn8M+76fTlaWTpRsiIi6ULk1uPGC68sYSbwMZDNruPWrZc3lKPdA2 7NVBqbTfUBagFxx3HLtFVDL1E2rYr+PIcIvd3sk9WS7XJeES6oMO2Q8f04xyunnHmr4z D34gyQoGL3vO1oEYp73B5l3c+tsAgB6xNq012nx3RseHBZ+hu2Wq+4aB2zP2zSPeTEgd M5gN9u43dMeyAdLtFXXMOcLpw/u48bcjY/7gzwWQb95DKND4vFnMe2lXgnIXUyTD7VKL ggoTJAsDIvTPLa5JkLrf3bQ3eeoLrBESG9i5FYVCGSBONaoZmT5umuob+oITwkRipW8H 1flw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=7bevixHOhNTAFyGzwNGYmquMrMGmGvSp9nJOKwLK1nI=; b=N6cvdyxYXofFJTiAO94ZYgCP1PigbdvSgR5eY83DkrtFOiV5hdVtwjCJdw/KWEURf1 3b+EhmY9DP1twdPU9CXlnX2U7sulysW3Sp2lhX9tebnlzIkzf0qv3F+ujzluUG1bzwOJ tbWQKuSikwyWDlSVoUHAlRaVI/N5uiwvKppWFfWO+z4F+qEK5aygpfIFD2akpZm6bO00 WfXTmOSvYRPuja9lVCTLYvGPet3n1lE68uZMCJNZkmqeZ6zDT5l0gShW7WK6JjMtqmXw 4IW3lAlRqNH3+Gm0PMrNU6fB+9mb4OjZch4MDJob7thE/SKSIL+QlGxZ8V9qt1ginB9M y2Jg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si3298461edx.121.2020.10.13.05.08.17; Tue, 13 Oct 2020 05:08:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727113AbgJMLma (ORCPT + 99 others); Tue, 13 Oct 2020 07:42:30 -0400 Received: from mga06.intel.com ([134.134.136.31]:34062 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726388AbgJMLm3 (ORCPT ); Tue, 13 Oct 2020 07:42:29 -0400 IronPort-SDR: Xvpqxlhl4wwiS7y0TSejNfA+9gwuJeKsh2bCqwSmJ8MXZqtr2HnbNC/OqxD27RTwe9dKCJGQQ3 tFUQr48x7AEQ== X-IronPort-AV: E=McAfee;i="6000,8403,9772"; a="227533114" X-IronPort-AV: E=Sophos;i="5.77,370,1596524400"; d="scan'208";a="227533114" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2020 04:42:26 -0700 IronPort-SDR: 4DLS+NwWImG7ltnbt45OuGGxGfkBzEsEWhp/3BkEZOwoeK64dwt3EgnXutdmw/HWlL1xeJscVv E0Vw0vVyR4Fw== X-IronPort-AV: E=Sophos;i="5.77,370,1596524400"; d="scan'208";a="318263274" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2020 04:42:24 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1kSIiD-005mp7-1D; Tue, 13 Oct 2020 14:43:25 +0300 Date: Tue, 13 Oct 2020 14:43:25 +0300 From: Andy Shevchenko To: Jing Xiangfeng Cc: andreas.noever@gmail.com, michael.jamet@intel.com, mika.westerberg@linux.intel.com, YehezkelShB@gmail.com, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] thunderbolt: Add the missed ida_simple_remove() in ring_request_msix() Message-ID: <20201013114325.GK4077@smile.fi.intel.com> References: <20201013024518.195557-1-jingxiangfeng@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201013024518.195557-1-jingxiangfeng@huawei.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 13, 2020 at 10:45:18AM +0800, Jing Xiangfeng wrote: > ring_request_msix() misses to call ida_simple_remove() in an error path. > Add the missed function call to fix it. ... > ring->irq = pci_irq_vector(ring->nhi->pdev, ring->vector); > - if (ring->irq < 0) > + if (ring->irq < 0) { > + ida_simple_remove(&nhi->msix_ida, ret); > return ring->irq; > + } > > irqflags = no_suspend ? IRQF_NO_SUSPEND : 0; > return request_irq(ring->irq, ring_msix, irqflags, "thunderbolt", ring); According to your logic don't you need it here as well? -- With Best Regards, Andy Shevchenko