From: Mahmoud Adam Date: Fri, 10 Nov 2023 18:21:04 +0000 (+0100) Subject: nfsd: fix file memleak on client_opens_release X-Git-Tag: v6.1.68~435 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1bb61fb7908c4bfd597b75c18569315facecdce5;p=platform%2Fkernel%2Flinux-starfive.git nfsd: fix file memleak on client_opens_release commit bc1b5acb40201a0746d68a7d7cfc141899937f4f upstream. seq_release should be called to free the allocated seq_file Cc: stable@vger.kernel.org # v5.3+ Signed-off-by: Mahmoud Adam Reviewed-by: Jeff Layton Fixes: 78599c42ae3c ("nfsd4: add file to display list of client's opens") Reviewed-by: NeilBrown Tested-by: Jeff Layton Signed-off-by: Chuck Lever Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 96714e1..faecdbf 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -2799,7 +2799,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 = {