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

This is a discussion on [PATCH] set relay file can not be read by pread(2) - Kernel ; 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 --- 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 ...

+ Reply to Thread
Results 1 to 2 of 2

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

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

    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

    --- 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@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

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

    On Wed, Mar 26 2008, Lai Jiangshan wrote:
    > 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
    >
    > --- 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);
    > }
    >
    > /**


    Good catch. I'll add it for 2.6.25.

    --
    Jens Axboe

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

+ Reply to Thread