xdr_encode_pages either leaves the tail iovec pointing to null or, if padding on the page data is needed, sets it to point to a little bit of static data. This is a problem if we're expecting to later append some data in gss_wrap_req. Modify xdr_encode_pages to make tail point to the end of the data in head, as xdr_inline_pages and xdr_write_pages do. diff -puN net/sunrpc/xdr.c~encode_pages_tail net/sunrpc/xdr.c --- linux-2.5.72/net/sunrpc/xdr.c~encode_pages_tail 2003-06-17 15:21:36.000000000 -0400 +++ linux-2.5.72-bfields/net/sunrpc/xdr.c 2003-06-17 15:21:36.000000000 -0400 @@ -111,11 +111,14 @@ xdr_encode_pages(struct xdr_buf *xdr, st xdr->page_base = base; xdr->page_len = len; + xdr->tail[0].iov_base = xdr->head[0].iov_base + xdr->head[0].iov_len; + xdr->tail[0].iov_len = 0; + if (len & 3) { struct iovec *iov = xdr->tail; unsigned int pad = 4 - (len & 3); - iov->iov_base = (void *) "\0\0\0"; + memset(iov->iov_base, 0, pad); iov->iov_len = pad; len += pad; } _