lkml.org 
[lkml]   [2015]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 0/3] pstore: add pstore unregister
From
On Tue, Oct 20, 2015 at 12:39 AM, Geliang Tang <geliangtang@163.com> wrote:
> On Mon, Oct 19, 2015 at 10:56:54PM +0000, Luck, Tony wrote:
>> Thanks for looking to close out this TODO item.
>>
>> The thing that scared me about unloading pstore was what happens to
>> a process that is in the middle of reading some /sys/fs/pstore/file-name-here

Were you able to verify that this reading-while-rmmod case works correctly?

-Kees

>>
>> Do we have all the right reference counts to make sure that process doesn't do
>> weird things if you rmmod pstore in the middle of a read? Or for a subsequent
>> read from the still-open file descriptor?
>>
>> -Tony
>
> Thanks for your review. I updated the patches as you suggested.
>
> // Increase a reference count when pstore file is read.
> static const struct file_operations pstore_file_operations = {
> + .owner = THIS_MODULE,
> .open = pstore_file_open,
> .read = pstore_file_read,
> .llseek = pstore_file_llseek,
>
> // Increase a reference count when pstore is mounted.
> static struct file_system_type pstore_fs_type = {
> + .owner = THIS_MODULE,
> .name = "pstore",
> .mount = pstore_mount,
> .kill_sb = pstore_kill_sb,
>
> ---
> Changes in v3:
> - Increase a reference count when pstore is used.
> Changes in v2:
> - Add pstore filesystem unregister.
> - update commit log.
> ---
>
> Geliang Tang (3):
> pstore: add vmalloc error check
> pstore: add a helper function pstore_register_kmsg
> pstore: add pstore unregister
>
> fs/pstore/Kconfig | 2 +-
> fs/pstore/Makefile | 6 +++---
> fs/pstore/ftrace.c | 23 ++++++++++++++++++-----
> fs/pstore/inode.c | 9 +++++++++
> fs/pstore/internal.h | 4 ++++
> fs/pstore/platform.c | 42 +++++++++++++++++++++++++++++++++++++++++-
> fs/pstore/pmsg.c | 9 +++++++++
> fs/pstore/ram.c | 17 +++++++----------
> include/linux/pstore.h | 14 +-------------
> kernel/printk/printk.c | 1 +
> 10 files changed, 94 insertions(+), 33 deletions(-)
>
> --
> 1.9.1
>
>



--
Kees Cook
Chrome OS Security


\
 
 \ /
  Last update: 2015-10-20 19:41    [W:0.060 / U:1.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site