public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Tomas Winkler <tomas.winkler@intel.com>
Cc: arnd@arndb.de, linux-kernel@vger.kernel.org
Subject: Re: [char-misc-next 5/5] mei: revamp read and write length checks
Date: Thu, 26 Sep 2013 08:22:45 -0700	[thread overview]
Message-ID: <20130926152245.GA26343@kroah.com> (raw)
In-Reply-To: <1378080664-7274-6-git-send-email-tomas.winkler@intel.com>

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@intel.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

      reply	other threads:[~2013-09-26 15:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-02  0:10 [char-misc-next 0/5] mei driver small fixes and cleanups Tomas Winkler
2013-09-02  0:11 ` [char-misc-next 1/5] mei: mei_cl_link protect open_handle_count from overflow Tomas Winkler
2013-09-02  0:11 ` [char-misc-next 2/5] mei: make sure that me_clients_map big enough before copying Tomas Winkler
2013-09-02  0:11 ` [char-misc-next 3/5] mei: mei_write correct checks for copy_from_user Tomas Winkler
2013-09-02  0:11 ` [char-misc-next 4/5] mei: fix format compilation warrning on 32 bit architecture Tomas Winkler
2013-09-02  0:11 ` [char-misc-next 5/5] mei: revamp read and write length checks Tomas Winkler
2013-09-26 15:22   ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130926152245.GA26343@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tomas.winkler@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox