[PATCH] set relay file can not be read by pread(2)

From: Lai Jiangshan
Date: Wed Mar 26 2008 - 03:45:59 EST


Hi:
I found that relay files can be read by pread(2). I fix it,
for relay files are not capable of seeking.

Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxx>

--- linux-2.6.24/kernel/relay.c.org 2008-01-25 06:58:37.000000000 +0800
+++ linux-2.6.24/kernel/relay.c 2008-03-17 23:53:14.000000000 +0800
@@ -741,7 +741,7 @@ static int relay_file_open(struct inode
kref_get(&buf->kref);
filp->private_data = buf;

- return 0;
+ return nonseekable_open(inode, filp);
}

/**

--
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/