mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Latchesar Ionkov" <lucho@ionkov.net>
To: "Abhishek Kulkarni" <kulkarni@lanl.gov>
Cc: v9fs-developer@lists.sourceforge.net, ericvh@gmail.com,
	linux-kernel@vger.kernel.org
Subject: Re: [V9fs-developer] [PATCH] 9p bug fix: return non-zero error value in p9_put_data
Date: Tue, 26 Aug 2008 12:53:48 -0600	[thread overview]
Message-ID: <f158dc670808261153l218dca95t9e68cabbd85ac68@mail.gmail.com> (raw)
In-Reply-To: <1219771831.16125.12.camel@blender>

Acked-by: Latchesar Ionkov <lucho@ionkov.net>

On Tue, Aug 26, 2008 at 11:30 AM, Abhishek Kulkarni <kulkarni@lanl.gov> wrote:
> p9_put_data is called by p9_create_twrite which expects it to return a
> non-zero value on error. This was the reason why every p9_client_write
> was failing. This patch also adds a check for buffer overflow in
> p9_put_data.
>
> Signed-off-by: Abhishek Kulkarni <kulkarni@lanl.gov>
> ---
>  net/9p/conv.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> diff --git a/net/9p/conv.c b/net/9p/conv.c
> index 4454720..7f6db15 100644
> --- a/net/9p/conv.c
> +++ b/net/9p/conv.c
> @@ -451,8 +451,11 @@ p9_put_data(struct cbuf *bufp, const char *data,
> int count,
>                   unsigned char **pdata)
>  {
>        *pdata = buf_alloc(bufp, count);
> +       if (buf_check_overflow(bufp))
> +               return -EIO;
> +
>        memmove(*pdata, data, count);
> -       return count;
> +       return 0;
>  }
>
>  static int
>
>
> Thanks,
>  -- Abhishek
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> V9fs-developer mailing list
> V9fs-developer@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/v9fs-developer
>

  reply	other threads:[~2008-08-26 18:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-26 17:30 Abhishek Kulkarni
2008-08-26 18:53 ` Latchesar Ionkov [this message]
2008-08-28 18:10 ` Eric Van Hensbergen
2008-08-28 18:35   ` Abhishek Kulkarni
2008-09-02 19:04     ` Abhishek Kulkarni
2008-09-23 20:33       ` Eric Van Hensbergen

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=f158dc670808261153l218dca95t9e68cabbd85ac68@mail.gmail.com \
    --to=lucho@ionkov.net \
    --cc=ericvh@gmail.com \
    --cc=kulkarni@lanl.gov \
    --cc=linux-kernel@vger.kernel.org \
    --cc=v9fs-developer@lists.sourceforge.net \
    /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

all inboxes | Powered by JetHome®