]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
afs: Fix page leak in afs_write_begin()
authorDavid Howells <dhowells@redhat.com>
Thu, 16 Mar 2017 16:27:48 +0000 (16:27 +0000)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 17 Jan 2018 17:55:35 +0000 (12:55 -0500)
commitb38a026e7efd5d260fdb52160d51cd1e29b8a476
tree811daae9fd5e36d722a4d8bb4e5fe5a449cb2ee0
parentfe218174a8cd439eff908001a7ebcdfd6786a114
afs: Fix page leak in afs_write_begin()

[ Upstream commit 6d06b0d25209c80e99c1e89700f1e09694a3766b ]

afs_write_begin() leaks a ref and a lock on a page if afs_fill_page()
fails.  Fix the leak by unlocking and releasing the page in the error path.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
fs/afs/write.c