]> git.baikalelectronics.ru Git - kernel.git/commit
NFSv4.2: fix error return on memory allocation failure
authorColin Ian King <colin.king@canonical.com>
Wed, 16 Dec 2020 12:25:13 +0000 (12:25 +0000)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 16 Dec 2020 12:54:42 +0000 (07:54 -0500)
commitfdf0cba419393e93509471441b0d5de4441f73db
tree3084f645de45a2bce9763c5bf2a5bab2bd87135d
parent3d756233adc94b70e2d535301689980a0b46289c
NFSv4.2: fix error return on memory allocation failure

Currently when an alloc_page fails the error return is not set in
variable err and a garbage initialized value is returned. Fix this
by setting err to -ENOMEM before taking the error return path.

Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: 98f3d9e04273 ("NFSv4.2: improve page handling for GETXATTR")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/nfs42proc.c