[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YYqWQaah0gNW9OqK@kroah.com>
Date: Tue, 9 Nov 2021 16:39:45 +0100
From: Greg Kroah Hartmann <gregkh@...uxfoundation.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Marc Zyngier <maz@...nel.org>, linux-pci@...r.kernel.org
Subject: Re: PCI/MSI: Destroy sysfs before freeing entries
On Tue, Nov 09, 2021 at 02:53:57PM +0100, Thomas Gleixner wrote:
> free_msi_irqs() frees the MSI entries before destroying the sysfs entries
> which are exposing them. Nothing prevents a concurrent free while a sysfs
> file is read and accesses the possibly freed entry.
>
> Move the sysfs release ahead of freeing the entries.
>
> Fixes: 1c51b50c2995 ("PCI/MSI: Export MSI mode using attributes, not kobjects")
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: stable@...r.kernel.org
> ---
> drivers/pci/msi.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
Reviewed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Powered by blists - more mailing lists