Re: parisc 4.13-git, BUG: sleeping function called from invalid context at mm/slab.h:416

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

 



On 2017-07-30, at 2:53 PM, Helge Deller wrote:

> On 30.07.2017 20:37, James Bottomley wrote:
>> On Sun, 2017-07-30 at 14:21 -0400, John David Anglin wrote:
>>> On 2017-07-30, at 2:12 PM, Meelis Roos wrote:
>>> 
>>>> 
>>>>> 
>>>>> How about this?  There's no need to take the write lock when
>>>>> creating
>>>>> links anyway.
>>>> 
>>>> No effect.
>>> 
>>> Is the backtrace still the same?
>> 
>> There's another write lock over a symlink in
>> pdcs_register_pathentries() does moving it up as well finally make this
>> go away (cumulative patch below).  If that doesn't work, enabling
>> DEBUG_PREEMPT might show which lock is the problem.
> 
> 
> That patch works.

Same here.

I noticed that when CONFIG_PDC_STABLE=m, it appears the PDC stable links are not setup.
The "PDC Stable Storage facility v0.30" message doesn't appear in the console output.

> 
> Helge
> 
>> diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c
>> index 7147aa53e9a2..3e0c90420a1b 100644
>> --- a/drivers/parisc/pdc_stable.c
>> +++ b/drivers/parisc/pdc_stable.c
>> @@ -331,13 +331,13 @@ pdcspath_hwpath_write(struct pdcspath_entry *entry, const char *buf, size_t coun
>> 	/* Now, dive in. Write back to the hardware */
>> 	pdcspath_store(entry);
>> 	
>> +	write_unlock(&entry->rw_lock);
>> +
>> 	/* Update the symlink to the real device */
>> 	sysfs_remove_link(&entry->kobj, "device");
>> 	ret = sysfs_create_link(&entry->kobj, &entry->dev->kobj, "device");
>> 	WARN_ON(ret);
>> 
>> -	write_unlock(&entry->rw_lock);
>> -	
>> 	printk(KERN_INFO PDCS_PREFIX ": changed \"%s\" path to \"%s\"\n",
>> 		entry->name, buf);
>> 	
>> @@ -998,6 +998,7 @@ pdcs_register_pathentries(void)
>> 		/* kobject is now registered */
>> 		write_lock(&entry->rw_lock);
>> 		entry->ready = 2;
>> +		write_unlock(&entry->rw_lock);
>> 		
>> 		/* Add a nice symlink to the real device */
>> 		if (entry->dev) {
>> @@ -1005,7 +1006,6 @@ pdcs_register_pathentries(void)
>> 			WARN_ON(err);
>> 		}
>> 
>> -		write_unlock(&entry->rw_lock);
>> 		kobject_uevent(&entry->kobj, KOBJ_ADD);
>> 	}


Dave
--
John David Anglin	dave.anglin@xxxxxxxx



--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux