projects
/
platform
/
kernel
/
linux-amlogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47ac09b
)
rpcrdma: Device kref is over-incremented on error from xa_alloc
author
Chuck Lever
<chuck.lever@oracle.com>
Mon, 12 Aug 2024 15:47:57 +0000
(11:47 -0400)
committer
Anna Schumaker
<Anna.Schumaker@Netapp.com>
Mon, 19 Aug 2024 15:50:41 +0000
(11:50 -0400)
If the device's reference count is too high, the device completion
callback never fires.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/ib_client.c
patch
|
blob
|
history
diff --git
a/net/sunrpc/xprtrdma/ib_client.c
b/net/sunrpc/xprtrdma/ib_client.c
index a938c19c3490d8e86a67ddfe3550ff67e1aa5c40..4d1e9fa89573e46ac6072f803ddba2b62aa04004 100644
(file)
--- a/
net/sunrpc/xprtrdma/ib_client.c
+++ b/
net/sunrpc/xprtrdma/ib_client.c
@@
-62,9
+62,9
@@
int rpcrdma_rn_register(struct ib_device *device,
if (!rd || test_bit(RPCRDMA_RD_F_REMOVING, &rd->rd_flags))
return -ENETUNREACH;
- kref_get(&rd->rd_kref);
if (xa_alloc(&rd->rd_xa, &rn->rn_index, rn, xa_limit_32b, GFP_KERNEL) < 0)
return -ENOMEM;
+ kref_get(&rd->rd_kref);
rn->rn_done = done;
return 0;
}