From: Geliang Tang <geliangtang@163.com>
To: Anton Vorontsov <anton@enomsg.org>,
Colin Cross <ccross@android.com>,
Kees Cook <keescook@chromium.org>,
Tony Luck <tony.luck@intel.com>
Cc: Geliang Tang <geliangtang@163.com>, linux-kernel@vger.kernel.org
Subject: [PATCH v3 0/3] pstore: add pstore unregister
Date: Tue, 20 Oct 2015 00:39:00 -0700 [thread overview]
Message-ID: <cover.1445353388.git.geliangtang@163.com> (raw)
In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F32B59323@ORSMSX114.amr.corp.intel.com>
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
>
> 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
next prev parent reply other threads:[~2015-10-20 7:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-16 15:25 [PATCH 1/3] pstore: add vmalloc error check Geliang Tang
2015-10-16 15:25 ` [PATCH 2/3] pstore: add a helper function pstore_register_kmsg Geliang Tang
2015-10-16 15:25 ` [PATCH 3/3] pstore: add 'rmmod ramoops' support Geliang Tang
2015-10-16 15:50 ` Kees Cook
2015-10-18 10:49 ` [PATCH v2 0/3] pstore: add pstore unregister Geliang Tang
2015-10-18 10:49 ` [PATCH v2 1/3] pstore: add vmalloc error check Geliang Tang
2015-10-18 10:49 ` [PATCH v2 2/3] pstore: add a helper function pstore_register_kmsg Geliang Tang
2015-10-18 10:49 ` [PATCH v2 3/3] pstore: add pstore unregister Geliang Tang
2015-10-19 22:56 ` Luck, Tony
2015-10-20 7:39 ` Geliang Tang [this message]
2015-10-20 7:39 ` [PATCH v3 1/3] pstore: add vmalloc error check Geliang Tang
2015-10-20 7:39 ` [PATCH v3 2/3] pstore: add a helper function pstore_register_kmsg Geliang Tang
2015-10-20 7:39 ` [PATCH v3 3/3] pstore: add pstore unregister Geliang Tang
2015-10-20 17:19 ` [PATCH v3 0/3] " Kees Cook
2015-10-21 2:52 ` Geliang Tang
2015-10-21 3:01 ` Kees Cook
2015-10-21 4:11 ` Geliang Tang
2015-10-21 16:38 ` Luck, Tony
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1445353388.git.geliangtang@163.com \
--to=geliangtang@163.com \
--cc=anton@enomsg.org \
--cc=ccross@android.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.