All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-kernel@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH 03/15] lkdtm: use generic_file_llseek in debugfs
Date: Tue, 14 Sep 2010 22:22:31 +0200	[thread overview]
Message-ID: <1284495763-7506-4-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1284495763-7506-1-git-send-email-arnd@arndb.de>

When the default llseek behavior gets changed to
not allowing seek, all file operations that rely
on the current behaviour need to use an explicit
.llseek operation.

The files that lkdtm uses in debugfs are regular
files and they get read using simple_read_from_buffer,
so generic_file_llseek is the right operation.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/misc/lkdtm.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/misc/lkdtm.c b/drivers/misc/lkdtm.c
index ef34de7..343b5d8 100644
--- a/drivers/misc/lkdtm.c
+++ b/drivers/misc/lkdtm.c
@@ -575,30 +575,39 @@ struct crash_entry {
 
 static const struct crash_entry crash_entries[] = {
 	{"DIRECT", {.read = lkdtm_debugfs_read,
+			.llseek = generic_file_llseek,
 			.open = lkdtm_debugfs_open,
 			.write = direct_entry} },
 	{"INT_HARDWARE_ENTRY", {.read = lkdtm_debugfs_read,
+			.llseek = generic_file_llseek,
 			.open = lkdtm_debugfs_open,
 			.write = int_hardware_entry} },
 	{"INT_HW_IRQ_EN", {.read = lkdtm_debugfs_read,
+			.llseek = generic_file_llseek,
 			.open = lkdtm_debugfs_open,
 			.write = int_hw_irq_en} },
 	{"INT_TASKLET_ENTRY", {.read = lkdtm_debugfs_read,
+			.llseek = generic_file_llseek,
 			.open = lkdtm_debugfs_open,
 			.write = int_tasklet_entry} },
 	{"FS_DEVRW", {.read = lkdtm_debugfs_read,
+			.llseek = generic_file_llseek,
 			.open = lkdtm_debugfs_open,
 			.write = fs_devrw_entry} },
 	{"MEM_SWAPOUT", {.read = lkdtm_debugfs_read,
+			.llseek = generic_file_llseek,
 			.open = lkdtm_debugfs_open,
 			.write = mem_swapout_entry} },
 	{"TIMERADD", {.read = lkdtm_debugfs_read,
+			.llseek = generic_file_llseek,
 			.open = lkdtm_debugfs_open,
 			.write = timeradd_entry} },
 	{"SCSI_DISPATCH_CMD", {.read = lkdtm_debugfs_read,
+			.llseek = generic_file_llseek,
 			.open = lkdtm_debugfs_open,
 			.write = scsi_dispatch_cmd_entry} },
 	{"IDE_CORE_CP",	{.read = lkdtm_debugfs_read,
+			.llseek = generic_file_llseek,
 			.open = lkdtm_debugfs_open,
 			.write = ide_core_cp_entry} },
 };
-- 
1.7.1


  parent reply	other threads:[~2010-09-14 20:26 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-14 20:22 [PATCH 00/15] change default_llseek action Arnd Bergmann
2010-09-14 20:22 ` Arnd Bergmann
2010-09-14 20:22 ` Arnd Bergmann
2010-09-14 20:22 ` [PATCH 01/15] drm: use noop_llseek Arnd Bergmann
2010-09-14 20:22   ` Arnd Bergmann
2010-09-14 20:22 ` [PATCH 02/15] net/wireless: use generic_file_llseek in debugfs Arnd Bergmann
2010-09-14 21:38   ` [PATCH] carl9170: " Christian Lamparter
2010-09-14 20:22 ` Arnd Bergmann [this message]
2010-09-14 20:22 ` [PATCH 04/15] arm/omap: use generic_file_llseek in iommu_debug Arnd Bergmann
2010-09-14 20:22 ` [PATCH 05/15] spufs: use llseek in all file operations Arnd Bergmann
2010-09-14 20:22   ` Arnd Bergmann
2010-09-14 20:22 ` [PATCH 06/15] ibmasmfs: use generic_file_llseek Arnd Bergmann
2010-09-14 20:22 ` [PATCH 07/15] raw: use explicit llseek file operations Arnd Bergmann
2010-09-14 20:22 ` [PATCH 08/15] irda/irnet: use noop_llseek Arnd Bergmann
2010-09-16  2:31   ` David Miller
2010-09-14 20:22 ` [PATCH 09/15] viotape: " Arnd Bergmann
2010-09-14 20:22 ` [PATCH 10/15] lirc: make chardev nonseekable Arnd Bergmann
2010-09-14 20:22 ` [PATCH 11/15] mac80211: disallow seeks in minstrel debug code Arnd Bergmann
2010-09-14 20:22 ` [PATCH 12/15] libfs: use generic_file_llseek for simple_attr Arnd Bergmann
2010-09-14 20:22 ` [PATCH 13/15] llseek: automatically add .llseek fop Arnd Bergmann
2010-09-14 20:22 ` [PATCH 14/15] vfs: don't use BKL in default_llseek Arnd Bergmann
2010-09-14 20:22 ` [PATCH 15/15] vfs: make no_llseek the default Arnd Bergmann
2010-09-15  9:39 ` [PATCH 00/15] change default_llseek action Stephen Rothwell
2010-09-15  9:39   ` Stephen Rothwell
2010-09-15 16:06   ` Luis R. Rodriguez
2010-09-15 16:06     ` Luis R. Rodriguez
2010-09-15 15:38 ` Valdis.Kletnieks
2010-09-15 15:38   ` Valdis.Kletnieks
2010-09-15 16:37   ` Arnd Bergmann
2010-09-15 16:37     ` Arnd Bergmann

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=1284495763-7506-4-git-send-email-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    /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.