summaryrefslogtreecommitdiff
path: root/arch/s390/kernel/processor.c
diff options
context:
space:
mode:
authorMisono Tomohiro <misono.tomohiro@jp.fujitsu.com>2019-08-28 17:01:22 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-24 07:59:11 +0200
commit6d3a2dca549bd0359acae3f6b9fd8199c4e092f5 (patch)
tree61c9e85497fd988bf0124049d2766d6d665022f1 /arch/s390/kernel/processor.c
parent95c48138f2ecaf6b0b048a6fdb8962e2741766dc (diff)
NFS: direct.c: Fix memory leak of dreq when nfs_get_lock_context fails
[ Upstream commit 8605cf0e852af3b2c771c18417499dc4ceed03d5 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/s390/kernel/processor.c')
0 files changed, 0 insertions, 0 deletions