[ 3.5.y.z extended stable ] Patch "dca: check against empty dca_domains list before unregister" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Thu Feb 28 11:57:15 UTC 2013
This is a note to let you know that I have just added a patch titled
dca: check against empty dca_domains list before unregister
to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From b23b69d9f8689a28b5585da224f72da7161d8932 Mon Sep 17 00:00:00 2001
From: Maciej Sosnowski <maciej.sosnowski at intel.com>
Date: Wed, 23 May 2012 17:27:07 +0200
Subject: [PATCH] dca: check against empty dca_domains list before unregister
provider
commit c419fcfd071cf34ba00f9f65282583772d2655e7 upstream.
When providers get blocked unregister_dca_providers() is called ending up
with dca_providers and dca_domain lists emptied. Dca should be prevented from
trying to unregister any provider if dca_domain list is found empty.
Reported-by: Jiang Liu <jiang.liu at huawei.com>
Tested-by: Gaohuai Han <hangaohuai at huawei.com>
Signed-off-by: Maciej Sosnowski <maciej.sosnowski at intel.com>
Signed-off-by: Dan Williams <djbw at fb.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
drivers/dca/dca-core.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/dca/dca-core.c b/drivers/dca/dca-core.c
index bc6f5fa..819dfda 100644
--- a/drivers/dca/dca-core.c
+++ b/drivers/dca/dca-core.c
@@ -420,6 +420,11 @@ void unregister_dca_provider(struct dca_provider *dca, struct device *dev)
raw_spin_lock_irqsave(&dca_lock, flags);
+ if (list_empty(&dca_domains)) {
+ raw_spin_unlock_irqrestore(&dca_lock, flags);
+ return;
+ }
+
list_del(&dca->node);
pci_rc = dca_pci_rc_from_dev(dev);
--
1.8.1.2
More information about the kernel-team
mailing list