[RHEL7,COMMIT] sysfs/ve: fix output cgroup/ve/ve.default_sysfs_permissions

Submitted by Konstantin Khorenko on March 22, 2019, 3:43 p.m.

Details

Message ID 201903221543.x2MFhVtn020823@finist-ce7.sw.ru
State New
Series "sysfs/ve: fix output cgroup/ve/ve.default_sysfs_permissions"
Headers show

Commit Message

Konstantin Khorenko March 22, 2019, 3:43 p.m.
The commit is pushed to "branch-rh7-3.10.0-957.10.1.vz7.85.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.10.1.vz7.85.2
------>
commit 58ba2bcab691e701dea94a8e6bc8fb7e95fb9ea1
Author: Andrey Ryabinin <aryabinin@virtuozzo.com>
Date:   Fri Mar 22 18:43:31 2019 +0300

    sysfs/ve: fix output cgroup/ve/ve.default_sysfs_permissions
    
    sysfs_perms_open() replaces ve0 with NULL which results in always empty
    output from cgroup/ve/ve.default_sysfs_permissions file.
    
    Fix that by passing correct ve0 address.
    
    Fixes: 7ce278f50962 ("ve/sysfs: add dentries visibility filter")
    Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
---
 fs/sysfs/ve.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/fs/sysfs/ve.c b/fs/sysfs/ve.c
index 1e8abec8296b..ea89e41d4b9e 100644
--- a/fs/sysfs/ve.c
+++ b/fs/sysfs/ve.c
@@ -111,7 +111,7 @@  static int sysfs_perms_open(struct inode *inode, struct file *file)
 	ret = seq_open(file, &sysfs_perms_sops);
 	if (!ret) {
 		m = file->private_data;
-		m->private = ve_is_super(ve) ? NULL : ve;
+		m->private = ve;
 	}
 	return ret;
 }