Re: [PATCH] mm:Avoid soft lockup due to possible attempt of double locking object's lock in __delete_object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2016-09-06 08:51 PM, Rik van Riel wrote:
> On Wed, 2016-08-31 at 17:28 -0400, nick wrote:
>>  
>> Rather then argue since that will go nowhere. I am posing actual
>> patches that have been tested on
>> hardware. 
> 
> But not by you, apparently.
> 
> The patch below was first posted by somebody else
> in 2013: https://lkml.org/lkml/2013/7/11/93
> 
> When re-posting somebody else's patch, you need to
> preserve their From: and Signed-off-by: headers.
> 
> See Documentation/SubmittingPatches for the details
> on that.
> 
> Pretending that other people's code is your own
> is not only very impolite, it also means that
> the origin of the code, and permission to distribute
> it under the GPL, are in question.
> 
> Will you promise to not claim other people's code as
> your own?
> 
I wasn't aware of that. Seems it was fixed before I got to 
it but was never merged. Next time I will double check if the
patch work is already out there. Also have this patch but the
commit message needs to be reworked:
>From 6364ca82f79a2b66f012f05ca4c7467c8fb2b1e8 Mon Sep 17 00:00:00 2001
From: Nicholas Krause <xerofoify@xxxxxxxxx>
Date: Wed, 31 Aug 2016 17:20:10 -0400
Subject: [PATCH] ata:Fix incorrect function call ordering in
 pata_ninja32_init_one

This fixes a incorrect function call ordering making cards using
this driver not being able to be read or written to due to the
incorrect calling of pci_set_master before other parts of the
card are registered before the pci master bus should be registered.

Signed-off-by: Nicholas Krause <xerofoify@xxxxxxxxx>
---
 drivers/ata/pata_ninja32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/pata_ninja32.c b/drivers/ata/pata_ninja32.c
index 44f97ad..89320c9 100644
--- a/drivers/ata/pata_ninja32.c
+++ b/drivers/ata/pata_ninja32.c
@@ -128,7 +128,6 @@ static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	rc = dma_set_coherent_mask(&dev->dev, ATA_DMA_MASK);
 	if (rc)
 		return rc;
-	pci_set_master(dev);
 
 	/* Set up the register mappings. We use the I/O mapping as only the
 	   older chips also have MMIO on BAR 1 */
@@ -148,6 +147,7 @@ static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 
 	ninja32_program(base);
 	/* FIXME: Should we disable them at remove ? */
+	pci_set_master(dev);
 	return ata_host_activate(host, dev->irq, ata_bmdma_interrupt,
 				 IRQF_SHARED, &ninja32_sht);
 }
-- 
2.7.4
Also seems this go one of the btrfs maintainers attention's for a few months ago,
https://bugzilla.kernel.org/show_bug.cgi?id=115041. 
In addition I don't remember  what other things I have other the work on these two regressions:
https://bugzilla.kernel.org/show_bug.cgi?id=152131
https://bugzilla.kernel.org/show_bug.cgi?id=120651
Sorry about the mistake and am assuming these are probably wrong but you tell me,
Nick
> Otherwise there is another very good reason to refuse
> ever accepting code posted by you into the kernel.
> We cannot merge code when there is no clear permission
> from the actual author to distribute it under the GPL.
> 
>> From 719ad39496679523c70c7dda006e6da31d9004b3 Mon Sep 17 00:00:00
>> 2001
>> From: Nicholas Krause <xerofoify@xxxxxxxxx>
>> Date: Wed, 24 Aug 2016 02:09:39 -0400
>> Subject: [PATCH] pciehp: Avoid not bringing up device if already
>> existing on
>>  bus
>>
>> This fixes pcihp_resume to now avoid incorrectly bailing out if the
>> device is already live in the pci bus but currently suspended.
>> Further
>> more this issue is caused by incorrectly checking the status of the
>> device adapter directly, instead since this adapter can be shared
>> we must instead also check if the pci_bus has no more links to this
>> adapter by checking if the pci_bus used by this adapter's device list
>> is also empty before enabling it. Finally do the opposite of checking
>> that the list is not empty before disabling in order to avoid the
>> same issue on disabling the slot instead.
>>
>> Signed-off-by: Nicholas Krause <xerofoify@xxxxxxxxx>
>> ---
>>  drivers/pci/hotplug/pciehp_core.c | 10 ++++++----
>>  1 file changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/pci/hotplug/pciehp_core.c
>> b/drivers/pci/hotplug/pciehp_core.c
>> index ac531e6..1ce725e 100644
>> --- a/drivers/pci/hotplug/pciehp_core.c
>> +++ b/drivers/pci/hotplug/pciehp_core.c
>> @@ -291,7 +291,7 @@ static int pciehp_resume(struct pcie_device *dev)
>>  	struct controller *ctrl;
>>  	struct slot *slot;
>>  	u8 status;
>> -
>> +	struct pci_bus *pbus = dev->port->subordinate;
>>  	ctrl = get_service_data(dev);
>>  
>>  	/* reinitialize the chipset's event detection logic */
>> @@ -302,10 +302,12 @@ static int pciehp_resume(struct pcie_device
>> *dev)
>>  	/* Check if slot is occupied */
>>  	pciehp_get_adapter_status(slot, &status);
>>  	mutex_lock(&slot->hotplug_lock);
>> -	if (status)
>> -		pciehp_enable_slot(slot);
>> -	else
>> +	if (status) {
>> +		if (list_empty(&pbus->devices))
>> +			pciehp_enable_slot(slot);
>> +	} else if (!list_empty(&pbus->devices))
>>  		pciehp_disable_slot(slot);
>> +
>>  	mutex_unlock(&slot->hotplug_lock);
>>  	return 0;
>>  }
>>  

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]