All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Zenghui Yu <yuzenghui@huawei.com>
Cc: <linux-kernel@vger.kernel.org>, <tglx@linutronix.de>,
	<jason@lakedaemon.net>, <wuyun.wu@huawei.com>,
	<wanghaibin.wang@huawei.com>
Subject: Re: [PATCH] irqchip/mbigen: Free msi_desc on device teardown
Date: Thu, 9 Apr 2020 10:27:18 +0100	[thread overview]
Message-ID: <20200409102718.73875cd9@why> (raw)
In-Reply-To: <20200408114352.1604-1-yuzenghui@huawei.com>

On Wed, 8 Apr 2020 19:43:52 +0800
Zenghui Yu <yuzenghui@huawei.com> wrote:

Hi Zenghui,

> Using irq_domain_free_irqs_common() on the irqdomain free path will
> leave the MSI descriptor unfreed when platform devices get removed.
> Properly free it by MSI domain free function.
> 
> Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
> ---
>  drivers/irqchip/irq-mbigen.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c
> index 6b566bba263b..ff7627b57772 100644
> --- a/drivers/irqchip/irq-mbigen.c
> +++ b/drivers/irqchip/irq-mbigen.c
> @@ -220,10 +220,16 @@ static int mbigen_irq_domain_alloc(struct irq_domain *domain,
>  	return 0;
>  }
>  
> +static void mbigen_irq_domain_free(struct irq_domain *domain, unsigned int virq,
> +				   unsigned int nr_irqs)
> +{
> +	platform_msi_domain_free(domain, virq, nr_irqs);
> +}
> +
>  static const struct irq_domain_ops mbigen_domain_ops = {
>  	.translate	= mbigen_domain_translate,
>  	.alloc		= mbigen_irq_domain_alloc,
> -	.free		= irq_domain_free_irqs_common,
> +	.free		= mbigen_irq_domain_free,
>  };
>  
>  static int mbigen_of_create_domain(struct platform_device *pdev,

Should this deserve a:

Fixes: 9650c60ebfec0 ("irqchip/mbigen: Create irq domain for each
mbigen device")

Otherwise queued for post -rc1.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2020-04-09  9:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08 11:43 [PATCH] irqchip/mbigen: Free msi_desc on device teardown Zenghui Yu
2020-04-09  9:27 ` Marc Zyngier [this message]
2020-04-09 10:30   ` Zenghui Yu
2020-04-17  9:56 ` [tip: irq/urgent] " tip-bot2 for Zenghui Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200409102718.73875cd9@why \
    --to=maz@kernel.org \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=wanghaibin.wang@huawei.com \
    --cc=wuyun.wu@huawei.com \
    --cc=yuzenghui@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.