[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130926152245.GA26343@kroah.com>
Date: Thu, 26 Sep 2013 08:22:45 -0700
From: Greg KH <gregkh@...uxfoundation.org>
To: Tomas Winkler <tomas.winkler@...el.com>
Cc: arnd@...db.de, linux-kernel@...r.kernel.org
Subject: Re: [char-misc-next 5/5] mei: revamp read and write length checks
On Mon, Sep 02, 2013 at 03:11:04AM +0300, Tomas Winkler wrote:
> 1. Return zero on zero length read and writes
> 2. For a too large write return -EFBIG as defined in man write(2)
> EFBIG An attempt was made to write a file that
> exceeds the implementation-defined maximum
> file size or the process's file size limit,
> or to write at a position past the maximum
> allowed offset.
>
> Signed-off-by: Tomas Winkler <tomas.winkler@...el.com>
> ---
> drivers/misc/mei/main.c | 16 ++++++++++++++--
> 1 file changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
> index 5ff810b..7404584 100644
> --- a/drivers/misc/mei/main.c
> +++ b/drivers/misc/mei/main.c
> @@ -203,12 +203,18 @@ static ssize_t mei_read(struct file *file, char __user *ubuf,
>
> dev = cl->dev;
>
> +
> mutex_lock(&dev->device_lock);
Not a big deal, but why the extra line?
greg k-h
--
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