From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1163376AbdAHKZ1 (ORCPT ); Sun, 8 Jan 2017 05:25:27 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:46604 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163252AbdAHKZD (ORCPT ); Sun, 8 Jan 2017 05:25:03 -0500 Date: Sun, 8 Jan 2017 02:24:59 -0800 From: Christoph Hellwig To: Andy Shevchenko Cc: Jan Kiszka , Christoph Hellwig , Greg Kroah-Hartman , Andy Shevchenko , "linux-serial@vger.kernel.org" , Linux Kernel Mailing List Subject: Re: [PATCH] serial: 8250_lpss: Release Quark MSI vectors on exit Message-ID: <20170108102459.GA3644@infradead.org> References: <0250c46e-da6c-71f3-50ae-b7c17fd0bd2c@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 05, 2017 at 12:19:56AM +0200, Andy Shevchenko wrote: > NAK, check the PCI devres code, please. Releasing something through devres that wasn't allocated using a devm_* or pcim_* function isn't expected, and we should fix that instead. pci_free_irq_vectors is _currently_ implemented by calling pci_disable_msi and pci_disable_msix, but there is no guarantee for that in the API. Your code works by accident, not by design. If you want the resources to be auto-released you need to add a proper pcim_alloc_irq_vectors API.