Re: [PATCH] nfsd: fix file memleak on client_opens_relaese

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2023-11-10 at 19:21 +0100, Mahmoud Adam wrote:
> seq_release should be called to free the allocated seq_file
> 
> Cc: stable@xxxxxxxxxxxxxxx # v5.3+
> Signed-off-by: Mahmoud Adam <mngyadam@xxxxxxxxxx>
> ---
>  fs/nfsd/nfs4state.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index 4045c852a450..40415929e2ae 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -2804,7 +2804,7 @@ static int client_opens_release(struct inode *inode, struct file *file)
> 
>  	/* XXX: alternatively, we could get/drop in seq start/stop */
>  	drop_client(clp);
> -	return 0;
> +	return seq_release(inode, file);
>  }
> 
>  static const struct file_operations client_states_fops = {
> --
> 2.40.1

Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux