Skip to content

Commit

Permalink
xprtrdma: treat all calls not a bcall when bc_serv is NULL
Browse files Browse the repository at this point in the history
(git-fixes).

suse-commit: 09657ad2ed0a957b8ff945e2b48bd6035b7f84a4
  • Loading branch information
tiwai committed Jul 29, 2022
1 parent a3fc3ec commit 1ddd926
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/sunrpc/xprtrdma/rpc_rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1120,6 +1120,7 @@ static bool
rpcrdma_is_bcall(struct rpcrdma_xprt *r_xprt, struct rpcrdma_rep *rep)
#if defined(CONFIG_SUNRPC_BACKCHANNEL)
{
struct rpc_xprt *xprt = &r_xprt->rx_xprt;
struct xdr_stream *xdr = &rep->rr_stream;
__be32 *p;

Expand All @@ -1143,6 +1144,10 @@ rpcrdma_is_bcall(struct rpcrdma_xprt *r_xprt, struct rpcrdma_rep *rep)
if (*p != cpu_to_be32(RPC_CALL))
return false;

/* No bc service. */
if (xprt->bc_serv == NULL)
return false;

/* Now that we are sure this is a backchannel call,
* advance to the RPC header.
*/
Expand Down

0 comments on commit 1ddd926

Please sign in to comment.