[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1270909064-7845-1-git-send-regression-fweisbec@gmail.com>
Date: Sat, 10 Apr 2010 16:17:44 +0200
From: Frederic Weisbecker <fweisbec@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Arnd Bergmann <arnd@...db.de>,
Matt Mackall <mpm@...enic.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Frederic Weisbecker <fweisbec@...il.com>
Subject: [PATCH] random: Forbid llseek on random chardev
From: Arnd Bergmann <arnd@...db.de>
Seeking on /dev/random and /dev/urandom is pointless.
Using generic_file_llseek means we no longer need to
take the BKL if anyone tries to seek on these.
Signed-off-by: Arnd Bergmann <arnd@...db.de>
Cc: Matt Mackall <mpm@...enic.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
---
drivers/char/random.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 2fd3d39..513c685 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1169,6 +1169,7 @@ const struct file_operations random_fops = {
.poll = random_poll,
.unlocked_ioctl = random_ioctl,
.fasync = random_fasync,
+ .open = nonseekable_open,
};
const struct file_operations urandom_fops = {
@@ -1176,6 +1177,7 @@ const struct file_operations urandom_fops = {
.write = random_write,
.unlocked_ioctl = random_ioctl,
.fasync = random_fasync,
+ .open = nonseekable_open,
};
/***************************************************************
--
1.6.2.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists