No subject
Fri May 4 11:17:54 EDT 2007
e8f5e610582908efe478a32520e3b167469f64a2.1180138977.git.iyer at netapp.com>
In-Reply-To: <
bc7afef1f3d5630884c24aa693df07d5e1c88c5a.1180138977.git.iyer at netapp.com>
References: <
bc7afef1f3d5630884c24aa693df07d5e1c88c5a.1180138977.git.iyer at netapp.com>
From: Rahul Iyer <iyer at netapp.com>
Date: Fri, 25 May 2007 15:18:09 -0700
Subject: [PATCH 2/5] Allocate a callback request only if you have a mempool
This patch adds a check for xprt->bc_mempool != NULL in xs_tcp_read_request.
This is for cases when you may receive a packet with the call header set. If
you're not expecting callbacks on the channel (e.g NFSv4.0), the code will
panic
i don't get when NFSv4.0 would set the call header.
Signed-off-by: Rahul Iyer <iyer at netapp.com>
---
net/sunrpc/xprtsock.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 94cc6dd..8c24516 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -691,7 +691,14 @@ static inline void xs_tcp_read_request(struct rpc_xprt
*xprt, skb_reader_t *desc
calldir = ntohl(xprt->tcp_calldir);
if (calldir == RPC_CALL) {
- req = xprt_alloc_bc_request(xprt);
+ if (xprt->bc_mempool)
+ req = xprt_alloc_bc_request(xprt);
+ else {
+ /*
+ * Received callback when none is expected
+ */
+ req = NULL;
+ }
if (!req) {
printk(KERN_NOTICE "Couldn't get rpc_rqst for the
allback! Dropping callback...\n");
--
don't you want to move the KERN_NOTICE into the case where
xprt_alloc_bc_request fails?
-->Andy
Thanks
> Regards
> Rahul
>
>
------=_Part_12247_26634023.1180624924764
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
<br><br><div><span class="gmail_quote">On 5/29/07, <b class="gmail_sendername">Iyer, Rahul</b> <<a href="mailto:Rahul.Iyer at netapp.com">Rahul.Iyer at netapp.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Any comments about the rest of the set?</blockquote><div><br>
More information about the pNFS
mailing list