diff options
author | 2019-08-28 17:01:22 +0900 | |
---|---|---|
committer | 2020-03-22 16:47:58 -0400 | |
commit | 8605cf0e852af3b2c771c18417499dc4ceed03d5 (patch) | |
tree | a644b130b68252f95d1f2203c9aa08dc395ab563 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | nfs: Fix up documentation in nfs_follow_referral() and nfs_do_submount() (diff) | |
download | wireguard-linux-8605cf0e852af3b2c771c18417499dc4ceed03d5.tar.xz wireguard-linux-8605cf0e852af3b2c771c18417499dc4ceed03d5.zip |
NFS: direct.c: Fix memory leak of dreq when nfs_get_lock_context fails
When dreq is allocated by nfs_direct_req_alloc(), dreq->kref is
initialized to 2. Therefore we need to call nfs_direct_req_release()
twice to release the allocated dreq. Usually it is called in
nfs_file_direct_{read, write}() and nfs_direct_complete().
However, current code only calls nfs_direct_req_relese() once if
nfs_get_lock_context() fails in nfs_file_direct_{read, write}().
So, that case would result in memory leak.
Fix this by adding the missing call.
Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions