kernel_optimize_test/net/sunrpc
Chuck Lever 1a33d8a284 svcrdma: Fix leak of transport addresses
Kernel memory leak detected:

unreferenced object 0xffff888849cdf480 (size 8):
  comm "kworker/u8:3", pid 2086, jiffies 4297898756 (age 4269.856s)
  hex dump (first 8 bytes):
    30 00 cd 49 88 88 ff ff                          0..I....
  backtrace:
    [<00000000acfc370b>] __kmalloc_track_caller+0x137/0x183
    [<00000000a2724354>] kstrdup+0x2b/0x43
    [<0000000082964f84>] xprt_rdma_format_addresses+0x114/0x17d [rpcrdma]
    [<00000000dfa6ed00>] xprt_setup_rdma_bc+0xc0/0x10c [rpcrdma]
    [<0000000073051a83>] xprt_create_transport+0x3f/0x1a0 [sunrpc]
    [<0000000053531a8e>] rpc_create+0x118/0x1cd [sunrpc]
    [<000000003a51b5f8>] setup_callback_client+0x1a5/0x27d [nfsd]
    [<000000001bd410af>] nfsd4_process_cb_update.isra.7+0x16c/0x1ac [nfsd]
    [<000000007f4bbd56>] nfsd4_run_cb_work+0x4c/0xbd [nfsd]
    [<0000000055c5586b>] process_one_work+0x1b2/0x2fe
    [<00000000b1e3e8ef>] worker_thread+0x1a6/0x25a
    [<000000005205fb78>] kthread+0xf6/0xfb
    [<000000006d2dc057>] ret_from_fork+0x3a/0x50

Introduce a call to xprt_rdma_free_addresses() similar to the way
that the TCP backchannel releases a transport's peer address
strings.

Fixes: 5d252f90a8 ("svcrdma: Add class for RDMA backwards direction transport")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2020-03-27 12:25:06 -04:00
..
auth_gss nfsd: export upcalls must not return ESTALE when mountd is down 2020-03-16 12:04:33 -04:00
xprtrdma svcrdma: Fix leak of transport addresses 2020-03-27 12:25:06 -04:00
addr.c SUNRPC: Use kmemdup_nul() in rpc_parse_scope_id() 2020-02-03 16:35:07 -05:00
auth_null.c
auth_unix.c
auth.c SUNRPC: Remove broken gss_mech_list_pseudoflavors() 2020-01-15 10:54:32 -05:00
backchannel_rqst.c SUNRPC: Destroy the back channel when we destroy the host transport 2019-10-30 12:04:35 -04:00
cache.c sunrpc: Add tracing for cache events 2020-03-16 12:04:34 -04:00
clnt.c svcrdma: Create a generic tracing class for displaying xdr_buf layout 2020-03-16 12:04:32 -04:00
debugfs.c
Kconfig
Makefile
netns.h
rpc_pipe.c kernel/notifier.c: remove blocking_notifier_chain_cond_register() 2019-12-04 19:44:12 -08:00
rpcb_clnt.c
sched.c SUNRPC: Capture signalled RPC tasks 2020-01-15 10:54:31 -05:00
socklib.c SUNRPC: Refactor xs_sendpages() 2020-03-16 12:04:33 -04:00
socklib.h SUNRPC: Refactor xs_sendpages() 2020-03-16 12:04:33 -04:00
stats.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
sunrpc_syms.c
sunrpc.h SUNRPC: Teach server to use xprt_sock_sendmsg for socket sends 2020-03-16 12:04:33 -04:00
svc_xprt.c SUNRPC: Fix a potential buffer overflow in 'svc_print_xprts()' 2020-03-27 12:22:57 -04:00
svc.c SUNRPC: Teach server to use xprt_sock_sendmsg for socket sends 2020-03-16 12:04:33 -04:00
svcauth_unix.c nfsd: export upcalls must not return ESTALE when mountd is down 2020-03-16 12:04:33 -04:00
svcauth.c SUNRPC: Trace gssproxy upcall results 2019-10-30 16:32:07 -04:00
svcsock.c SUNRPC: Teach server to use xprt_sock_sendmsg for socket sends 2020-03-16 12:04:33 -04:00
sysctl.c
timer.c
xdr.c SUNRPC: constify copied structure 2020-01-15 10:54:31 -05:00
xprt.c svcrdma: Create a generic tracing class for displaying xdr_buf layout 2020-03-16 12:04:32 -04:00
xprtmultipath.c
xprtsock.c SUNRPC: Teach server to use xprt_sock_sendmsg for socket sends 2020-03-16 12:04:33 -04:00