Whamcloud - gitweb
LU-17684 mdt: lprocfs_mdt_open_files_seq_open() leaks op_data 91/54591/7
authorAlex Zhuravlev <bzzz@whamcloud.com>
Wed, 27 Mar 2024 18:54:01 +0000 (21:54 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 23 Apr 2024 19:56:33 +0000 (19:56 +0000)
op_data is allocated in single_open() and paired single_close()
is supposed to free it, but instead seq_release() was used.

same for ldlm_granted_fops.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I91846ea7a2c896cb57b878905db4f3630939a652
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54591
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/ldlm/ldlm_resource.c
lustre/mdt/mdt_fs.c

index 46ade03..83ed8c5 100644 (file)
@@ -200,7 +200,7 @@ static const struct file_operations ldlm_granted_fops = {
        .open   = seq_granted_open,
        .read   = seq_read,
        .llseek = seq_lseek,
-       .release = seq_release,
+       .release = single_release,
 };
 
 #endif /* HAVE_SERVER_SUPPORT */
index 2335524..7fc6e6e 100644 (file)
@@ -44,7 +44,7 @@ static const struct proc_ops mdt_open_files_seq_fops = {
        .proc_open              = lprocfs_mdt_open_files_seq_open,
        .proc_read              = seq_read,
        .proc_lseek             = seq_lseek,
-       .proc_release           = seq_release,
+       .proc_release           = single_release,
 };
 
 /**