[PATCH 2/3] V4L: zc0301, remove bad usage of ERESTARTSYS - Kernel

This is a discussion on [PATCH 2/3] V4L: zc0301, remove bad usage of ERESTARTSYS - Kernel ; zc0301, remove bad usage of ERESTARTSYS down_read_trylock can't be interrupted and so ERESTARTSYS would reach userspace, which is not permitted. Change it to EAGAIN Signed-off-by: Jiri Slaby --- commit 235cf594bc65128250632a642f3e9d7e4df4975e tree 0557746416827daeb4d829610fec2f0c9111a675 parent db38c559d37219c32b179ae005ca7e489336ec94 author Jiri Slaby Mon, 08 Oct ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: [PATCH 2/3] V4L: zc0301, remove bad usage of ERESTARTSYS

  1. [PATCH 2/3] V4L: zc0301, remove bad usage of ERESTARTSYS

    zc0301, remove bad usage of ERESTARTSYS

    down_read_trylock can't be interrupted and so ERESTARTSYS would reach
    userspace, which is not permitted. Change it to EAGAIN

    Signed-off-by: Jiri Slaby

    ---
    commit 235cf594bc65128250632a642f3e9d7e4df4975e
    tree 0557746416827daeb4d829610fec2f0c9111a675
    parent db38c559d37219c32b179ae005ca7e489336ec94
    author Jiri Slaby Mon, 08 Oct 2007 14:15:47 +0200
    committer Jiri Slaby Mon, 08 Oct 2007 14:15:47 +0200

    drivers/media/video/zc0301/zc0301_core.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/drivers/media/video/zc0301/zc0301_core.c b/drivers/media/video/zc0301/zc0301_core.c
    index 35138c5..08a93c3 100644
    --- a/drivers/media/video/zc0301/zc0301_core.c
    +++ b/drivers/media/video/zc0301/zc0301_core.c
    @@ -655,7 +655,7 @@ static int zc0301_open(struct inode* inode, struct file* filp)
    int err = 0;

    if (!down_read_trylock(&zc0301_dev_lock))
    - return -ERESTARTSYS;
    + return -EAGAIN;

    cam = video_get_drvdata(video_devdata(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 2/3] V4L: zc0301, remove bad usage of ERESTARTSYS

    acked-by: Luca Risolia


    On Monday 08 October 2007 14:40:53 Jiri Slaby wrote:
    > zc0301, remove bad usage of ERESTARTSYS
    >
    > down_read_trylock can't be interrupted and so ERESTARTSYS would reach
    > userspace, which is not permitted. Change it to EAGAIN
    >
    > Signed-off-by: Jiri Slaby
    >
    > ---
    > commit 235cf594bc65128250632a642f3e9d7e4df4975e
    > tree 0557746416827daeb4d829610fec2f0c9111a675
    > parent db38c559d37219c32b179ae005ca7e489336ec94
    > author Jiri Slaby Mon, 08 Oct 2007 14:15:47 +0200
    > committer Jiri Slaby Mon, 08 Oct 2007 14:15:47 +0200
    >
    > drivers/media/video/zc0301/zc0301_core.c | 2 +-
    > 1 files changed, 1 insertions(+), 1 deletions(-)
    >
    > diff --git a/drivers/media/video/zc0301/zc0301_core.c
    > b/drivers/media/video/zc0301/zc0301_core.c index 35138c5..08a93c3 100644
    > --- a/drivers/media/video/zc0301/zc0301_core.c
    > +++ b/drivers/media/video/zc0301/zc0301_core.c
    > @@ -655,7 +655,7 @@ static int zc0301_open(struct inode* inode, struct
    > file* filp) int err = 0;
    >
    > if (!down_read_trylock(&zc0301_dev_lock))
    > - return -ERESTARTSYS;
    > + return -EAGAIN;
    >
    > cam = video_get_drvdata(video_devdata(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/

+ Reply to Thread