Chuck Lever f61f6da0d5 NFS: Prevent memory allocation failure in nfsacl_encode()
nfsacl_encode() allocates memory in certain cases.  This of course
is not guaranteed to work.

Since commit 9f06c719 "SUNRPC: New xdr_streams XDR encoder API", the
kernel's XDR encoders can't return a result indicating possibly a
failure, so a memory allocation failure in nfsacl_encode() has become
fatal (ie, the XDR code Oopses) in some cases.

However, the allocated memory is a tiny fixed amount, on the order
of 40-50 bytes.  We can easily use a stack-allocated buffer for
this, with only a wee bit of nose-holding.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2011-01-25 15:24:47 -05:00
..
2011-01-06 14:46:32 -05:00
2010-05-14 15:09:31 -04:00
2011-01-12 20:02:45 -05:00
2010-10-27 21:39:39 +02:00
2010-12-21 11:51:23 -05:00
2010-10-23 15:27:35 -04:00
2010-10-26 13:56:42 -04:00
2011-01-06 14:46:32 -05:00
2011-01-06 14:46:32 -05:00
2011-01-04 13:10:36 -05:00
2011-01-12 20:02:45 -05:00
2010-10-07 18:48:49 -04:00