Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pstore-v6.2-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull pstore fixes from Kees Cook:

- Switch pmsg_lock to an rt_mutex to avoid priority inversion (John
Stultz)

- Correctly assign mem_type property (Luca Stefani)

* tag 'pstore-v6.2-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
pstore: Properly assign mem_type property
pstore: Make sure CONFIG_PSTORE_PMSG selects CONFIG_RT_MUTEXES
pstore: Switch pmsg_lock to an rt_mutex to avoid priority inversion

+6 -4
+1
fs/pstore/Kconfig
··· 126 126 config PSTORE_PMSG 127 127 bool "Log user space messages" 128 128 depends on PSTORE 129 + select RT_MUTEXES 129 130 help 130 131 When the option is enabled, pstore will export a character 131 132 interface /dev/pmsg0 to log user space messages. On reboot
+4 -3
fs/pstore/pmsg.c
··· 7 7 #include <linux/device.h> 8 8 #include <linux/fs.h> 9 9 #include <linux/uaccess.h> 10 + #include <linux/rtmutex.h> 10 11 #include "internal.h" 11 12 12 - static DEFINE_MUTEX(pmsg_lock); 13 + static DEFINE_RT_MUTEX(pmsg_lock); 13 14 14 15 static ssize_t write_pmsg(struct file *file, const char __user *buf, 15 16 size_t count, loff_t *ppos) ··· 29 28 if (!access_ok(buf, count)) 30 29 return -EFAULT; 31 30 32 - mutex_lock(&pmsg_lock); 31 + rt_mutex_lock(&pmsg_lock); 33 32 ret = psinfo->write_user(&record, buf); 34 - mutex_unlock(&pmsg_lock); 33 + rt_mutex_unlock(&pmsg_lock); 35 34 return ret ? ret : count; 36 35 } 37 36
+1 -1
fs/pstore/ram.c
··· 680 680 field = value; \ 681 681 } 682 682 683 - parse_u32("mem-type", pdata->record_size, pdata->mem_type); 683 + parse_u32("mem-type", pdata->mem_type, pdata->mem_type); 684 684 parse_u32("record-size", pdata->record_size, 0); 685 685 parse_u32("console-size", pdata->console_size, 0); 686 686 parse_u32("ftrace-size", pdata->ftrace_size, 0);