Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c75969e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
  NFS: don't try to decode GETATTR if DELEGRETURN returned error
  sunrpc: handle allocation errors from __rpc_lookup_create()
  SUNRPC: Fix the return value of rpc_run_bc_task()
  SUNRPC: Fix a use after free bug with the NFSv4.1 backchannel
  SUNRPC: Fix a potential memory leak in auth_gss
  NFS: Prevent another deadlock in nfs_release_page()
parents c02c873c 556ae3bb
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -491,7 +491,8 @@ static int nfs_release_page(struct page *page, gfp_t gfp)
{
{
	dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page);
	dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page);


	if (gfp & __GFP_WAIT)
	/* Only do I/O if gfp is a superset of GFP_KERNEL */
	if ((gfp & GFP_KERNEL) == GFP_KERNEL)
		nfs_wb_page(page->mapping->host, page);
		nfs_wb_page(page->mapping->host, page);
	/* If PagePrivate() is set, then the page is not freeable */
	/* If PagePrivate() is set, then the page is not freeable */
	if (PagePrivate(page))
	if (PagePrivate(page))
+2 −0
Original line number Original line Diff line number Diff line
@@ -5552,6 +5552,8 @@ static int nfs4_xdr_dec_delegreturn(struct rpc_rqst *rqstp, __be32 *p, struct nf
	if (status != 0)
	if (status != 0)
		goto out;
		goto out;
	status = decode_delegreturn(&xdr);
	status = decode_delegreturn(&xdr);
	if (status != 0)
		goto out;
	decode_getfattr(&xdr, res->fattr, res->server,
	decode_getfattr(&xdr, res->fattr, res->server,
			!RPC_IS_ASYNC(rqstp->rq_task));
			!RPC_IS_ASYNC(rqstp->rq_task));
out:
out:
+4 −1
Original line number Original line Diff line number Diff line
@@ -36,7 +36,6 @@ struct rpc_rqst *xprt_alloc_bc_request(struct rpc_xprt *xprt);
void xprt_free_bc_request(struct rpc_rqst *req);
void xprt_free_bc_request(struct rpc_rqst *req);
int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs);
int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs);
void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs);
void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs);
void bc_release_request(struct rpc_task *);
int bc_send(struct rpc_rqst *req);
int bc_send(struct rpc_rqst *req);


/*
/*
@@ -59,6 +58,10 @@ static inline int svc_is_backchannel(const struct svc_rqst *rqstp)
{
{
	return 0;
	return 0;
}
}

static inline void xprt_free_bc_request(struct rpc_rqst *req)
{
}
#endif /* CONFIG_NFS_V4_1 */
#endif /* CONFIG_NFS_V4_1 */
#endif /* _LINUX_SUNRPC_BC_XPRT_H */
#endif /* _LINUX_SUNRPC_BC_XPRT_H */
+2 −3
Original line number Original line Diff line number Diff line
@@ -1280,9 +1280,8 @@ alloc_enc_pages(struct rpc_rqst *rqstp)
	rqstp->rq_release_snd_buf = priv_release_snd_buf;
	rqstp->rq_release_snd_buf = priv_release_snd_buf;
	return 0;
	return 0;
out_free:
out_free:
	for (i--; i >= 0; i--) {
	rqstp->rq_enc_pages_num = i;
		__free_page(rqstp->rq_enc_pages[i]);
	priv_release_snd_buf(rqstp);
	}
out:
out:
	return -EAGAIN;
	return -EAGAIN;
}
}
+0 −15
Original line number Original line Diff line number Diff line
@@ -37,21 +37,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


#define RPCDBG_FACILITY	RPCDBG_SVCDSP
#define RPCDBG_FACILITY	RPCDBG_SVCDSP


void bc_release_request(struct rpc_task *task)
{
	struct rpc_rqst *req = task->tk_rqstp;

	dprintk("RPC:       bc_release_request: task= %p\n", task);

	/*
	 * Release this request only if it's a backchannel
	 * preallocated request
	 */
	if (!bc_prealloc(req))
		return;
	xprt_free_bc_request(req);
}

/* Empty callback ops */
/* Empty callback ops */
static const struct rpc_call_ops nfs41_callback_ops = {
static const struct rpc_call_ops nfs41_callback_ops = {
};
};
Loading