[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20071018105312.GO3778@stusta.de>
Date: Thu, 18 Oct 2007 12:53:12 +0200
From: Adrian Bunk <bunk@...nel.org>
To: Tom Talpey <talpey@...app.com>,
Trond Myklebust <Trond.Myklebust@...app.com>
Cc: linux-kernel@...r.kernel.org
Subject: [2.6 patch] sunrpc/xprtrdma/transport.c: fix use-after-free
This patch fixes an obvious use-after-free spotted by the Coverity
checker.
Signed-off-by: Adrian Bunk <bunk@...nel.org>
---
9bb1151172d05c2ffdb09302eb82ca6e1edae47d
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
index dc55cc9..1afeb3e 100644
--- a/net/sunrpc/xprtrdma/transport.c
+++ b/net/sunrpc/xprtrdma/transport.c
@@ -320,9 +320,9 @@ xprt_setup_rdma(struct xprt_create *args)
xprt->slot = kcalloc(xprt->max_reqs,
sizeof(struct rpc_rqst), GFP_KERNEL);
if (xprt->slot == NULL) {
- kfree(xprt);
dprintk("RPC: %s: couldn't allocate %d slots\n",
__func__, xprt->max_reqs);
+ kfree(xprt);
return ERR_PTR(-ENOMEM);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists