Re: [PATCH] NFSv4/pnfs: minor fix for cleanup path in nfs4_get_device_info

From: Benjamin Coddington
Date: Thu Jul 20 2023 - 12:54:20 EST


On 20 Jul 2023, at 11:37, Fedor Pchelkin wrote:

> It is an almost improbable error case but when page allocating loop in
> nfs4_get_device_info() fails then we should only free the already
> allocated pages, as __free_page() can't deal with NULL arguments.
>
> Found by Linux Verification Center (linuxtesting.org).
>
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Fedor Pchelkin <pchelkin@xxxxxxxxx>

This looks correct to me.

Reviewed-by: Benjamin Coddington <bcodding@xxxxxxxxxx>

Ben