Re: [PATCH 18/18] vfs: make no_llseek the default

From: Tetsuo Handa
Date: Thu Jul 08 2010 - 08:57:51 EST


Arnd Bergmann wrote:
> The behaviour you want is noop_llseek, which is what gets used
> when the semantic patch is applied. If you wish, you can
> do the patch yourself and add .llseek = noop_llseek to the file
> operations in your tree.

I see. [PATCH 16/18] ( http://lkml.org/lkml/2010/7/7/258 ) contains a line

security/tomoyo/common.c | 1 +

but no change in the patch. Patch was too large?
Anyway, that part is no longer in security/tomoyo/common.c
and is now security/tomoyo/securityfs_if.c .
James, please apply below patch.
----------
>From d0fdb09cdc8ef46151d330a9fc285de86306fa65 Mon Sep 17 00:00:00 2001
From: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 8 Jul 2010 21:38:05 +0900
Subject: [PATCH] TOMOYO: Explicitly set file_operations->llseek pointer.

TOMOYO does not deal offset pointer. Thus seek operation makes
no sense. Changing default seek operation from default_llseek()
to no_llseek() might break some applications. Thus, explicitly
set noop_llseek().

Signed-off-by: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
---
security/tomoyo/securityfs_if.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/security/tomoyo/securityfs_if.c b/security/tomoyo/securityfs_if.c
index 9967c1c..e43d555 100644
--- a/security/tomoyo/securityfs_if.c
+++ b/security/tomoyo/securityfs_if.c
@@ -95,6 +95,7 @@ static const struct file_operations tomoyo_operations = {
.poll = tomoyo_poll,
.read = tomoyo_read,
.write = tomoyo_write,
+ .llseek = noop_llseek,
};

/**
--
1.6.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/