From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: NeilBrown <neilb@suse.de>
Cc: linux-nfs@vger.kernel.org
Subject: Re: Bug in xdr_copy_to_scratch???
Date: Thu, 17 Mar 2011 19:22:19 -0400 [thread overview]
Message-ID: <1300404139.4621.1.camel@lade.trondhjem.org> (raw)
In-Reply-To: <20110318101608.34bb1117@notabene.brown>
On Fri, 2011-03-18 at 10:16 +1100, NeilBrown wrote:
> On Thu, 17 Mar 2011 14:01:05 -0400 Trond Myklebust
> <Trond.Myklebust@netapp.com> wrote:
>
> > On Thu, 2011-03-17 at 09:38 +1100, NeilBrown wrote:
> > > We should probably submit a fix to 2.6.37-stable though. For that it
> > > is possibly simplest to tell xdr_decode_inline to round nbytes up to
> > > a multiple of 4 - would you agree?
> >
> > How about the following fix for 2.6.37 stable?
>
> That is good for NFSv3, but NFSv2 has the same problem. Code fragment is
> p = xdr_inline_decode(xdr, entry->len + 4);
> if (unlikely(!p))
> goto out_overflow;
> entry->name = (const char *) p;
> p += XDR_QUADLEN(entry->len);
> entry->prev_cookie = entry->cookie;
> entry->cookie = ntohl(*p++);
>
> so again we have the cookie after the name and they are decoded together.
Fair enough. I'll fix that one too.
--
Trond Myklebust
Linux NFS client maintainer
NetApp
Trond.Myklebust@netapp.com
www.netapp.com
next prev parent reply other threads:[~2011-03-17 23:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-16 10:36 Bug in xdr_copy_to_scratch??? NeilBrown
2011-03-16 13:42 ` Trond Myklebust
2011-03-16 22:38 ` NeilBrown
2011-03-16 22:57 ` Trond Myklebust
2011-03-17 18:01 ` Trond Myklebust
2011-03-17 23:16 ` NeilBrown
2011-03-17 23:22 ` Trond Myklebust [this message]
2011-03-17 23:27 ` Trond Myklebust
2011-03-18 0:51 ` NeilBrown
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=1300404139.4621.1.camel@lade.trondhjem.org \
--to=trond.myklebust@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).