Re: mount.nfs: Protocol error after upgrade to linux/master

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 15 Mar 2019 12:08:15 -0700, Jakub Kicinski wrote:
> On Fri, 15 Mar 2019 18:41:20 +0000, Trond Myklebust wrote:
> > On Fri, 2019-03-15 at 11:05 -0700, Jakub Kicinski wrote:  
> > > Hi,
> > > 
> > > I just upgraded from:
> > > 
> > > commit a3b1933d34d5bb26d7503752e3528315a9e28339 (net)
> > > Merge: c6873d18cb4a 24319258660a
> > > Author: David S. Miller <davem@xxxxxxxxxxxxx>
> > > Date:   Mon Mar 11 16:22:49 2019 -0700
> > > 
> > > to
> > > 
> > > commit 3b319ee220a8795406852a897299dbdfc1b09911
> > > Merge: 9352ca585b2a b6e88119f1ed
> > > Author: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> > > Date:   Thu Mar 14 10:48:14 2019 -0700
> > > 
> > > and I'm seeing:
> > > 
> > > # mount /home/
> > > mount.nfs: Protocol error
> > > 
> > > No errors in dmesg, please let me know if it's a known problem or
> > > what
> > > other info could be of use.    
> > 
> > It sounds like the exact same problem that Marc Dionne reported seeing.
> > Can you also try the patch at 
> > http://git.linux-nfs.org/?p=trondmy/linux-nfs.git;a=patch;h=513149607d19bc3821386fb5ac75f8b99fd4b115
> > ?  
> 
> Sorry, I didn't see your reply, trying now..

Didn't seem to help:

$ git show
commit a79da625d196d00d19e8cbf8ec6eff3a323e3423 (HEAD -> work)
Author: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
Date:   Fri Mar 15 12:55:59 2019 -0400

    SUNRPC: Fix the minimal size for reply buffer allocation
    
    We must at minimum allocate enough memory to be able to see any auth
    errors in the reply from the server.
    
    Fixes: 2c94b8eca1a26 ("SUNRPC: Use au_rslack when computing reply...")
    Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>

diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 4216fe33204a..310873895578 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1730,7 +1730,12 @@ call_allocate(struct rpc_task *task)
        req->rq_callsize = RPC_CALLHDRSIZE + (auth->au_cslack << 1) +
                           proc->p_arglen;
        req->rq_callsize <<= 2;
-       req->rq_rcvsize = RPC_REPHDRSIZE + auth->au_rslack + proc->p_replen;
+       /*
+        * Note: the reply buffer must at minimum allocate enough space
+        * for the 'struct accepted_reply' from RFC5531.
+        */
+       req->rq_rcvsize = RPC_REPHDRSIZE + auth->au_rslack + \
+                       max_t(size_t, proc->p_replen, 2);
        req->rq_rcvsize <<= 2;
 
        status = xprt->ops->buf_alloc(task);

# uname -r
5.0.0-11527-ga79da625d196
# mount /home/
mount.nfs: Protocol error



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux