NFSv4.2: Fix a potential double free with READ_PLUS
authorAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 16 May 2023 15:19:25 +0000 (11:19 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Fri, 19 May 2023 21:11:59 +0000 (17:11 -0400)
commit43439d858bbae244a510de47f9a55f667ca4ed52
treefaaf5058f6c06f65e62beb1b6d6dfe4b77c94f36
parentd180891fba995bd54e25b089b1ec98d134873586
NFSv4.2: Fix a potential double free with READ_PLUS

kfree()-ing the scratch page isn't enough, we also need to set the pointer
back to NULL to avoid a double-free in the case of a resend.

Fixes: fbd2a05f29a9 (NFSv4.2: Rework scratch handling for READ_PLUS)
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4proc.c