android_kernel_motorola_sm6375/net/sunrpc
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Baptiste Lepers a04c2a398d sunrpc: Fix misplaced barrier in call_decode
[ Upstream commit f8f7e0fb22b2e75be55f2f0c13e229e75b0eac07 ]

Fix a misplaced barrier in call_decode. The struct rpc_rqst is modified
as follows by xprt_complete_rqst:

req->rq_private_buf.len = copied;
/* Ensure all writes are done before we update */
/* req->rq_reply_bytes_recvd */
smp_wmb();
req->rq_reply_bytes_recvd = copied;

And currently read as follows by call_decode:

smp_rmb(); // misplaced
if (!req->rq_reply_bytes_recvd)
   goto out;
req->rq_rcv_buf.len = req->rq_private_buf.len;

This patch places the smp_rmb after the if to ensure that
rq_reply_bytes_recvd and rq_private_buf.len are read in order.

Fixes: 9ba828861c ("SUNRPC: Don't try to parse incomplete RPC messages")
Signed-off-by: Baptiste Lepers <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2021-05-19 10:08:27 +02:00
..
auth_gss rpc: fix NULL dereference on kmalloc failure 2021-04-07 14:47:38 +02:00
xprtrdma svcrdma: disable timeouts on rdma backchannel 2021-03-24 11:26:38 +01:00
addr.c net: sunrpc: interpret the return value of kstrtou32 correctly 2021-01-19 18:26:18 +01:00
auth.c
auth_null.c
auth_unix.c
backchannel_rqst.c
cache.c sunrpc: Fix potential leaks in sunrpc_cache_unhash() 2020-02-24 08:36:55 +01:00
clnt.c sunrpc: Fix misplaced barrier in call_decode 2021-05-19 10:08:27 +02:00
debugfs.c net: sunrpc: Fix 'snprintf' return value check in 'do_xprt_debugfs' 2020-12-30 11:51:16 +01:00
Kconfig
Makefile
netns.h
rpc_pipe.c sunrpc: fixed rollback in rpc_gssd_dummy_populate() 2020-06-30 15:37:11 -04:00
rpcb_clnt.c SUNRPC: stop printk reading past end of string 2020-09-23 12:40:36 +02:00
sched.c SUNRPC: Set memalloc_nofs_save() for sync tasks 2021-03-17 17:03:56 +01:00
socklib.c
stats.c
sunrpc.h sunrpc: check that domain table is empty at module unload. 2020-08-05 09:59:41 +02:00
sunrpc_syms.c sunrpc: check that domain table is empty at module unload. 2020-08-05 09:59:41 +02:00
svc.c sunrpc: fix refcount leak for rpc auth modules 2021-03-24 11:26:39 +01:00
svc_xprt.c NFSD: Repair misuse of sv_lock in 5.10.16-rt30. 2021-03-24 11:26:38 +01:00
svcauth.c sunrpc: check that domain table is empty at module unload. 2020-08-05 09:59:41 +02:00
svcauth_unix.c
svcsock.c nfsd: Fix NFSv4 READ on RDMA when using readv 2020-08-11 15:33:42 +02:00
sysctl.c
timer.c
xdr.c SUNRPC: Properly set the @subbuf parameter of xdr_buf_subsegment() 2020-06-30 15:37:12 -04:00
xprt.c SUNRPC: xprt_load_transport() needs to support the netid "rdma6" 2020-12-30 11:51:16 +01:00
xprtmultipath.c
xprtsock.c sunrpc: fix xs_read_xdr_buf for partial pages receive 2020-12-30 11:51:26 +01:00