mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
Revert "zram: convert remaining CLASS_ATTR() to CLASS_ATTR_RO()"
commit853eab68af
upstream. Turns out that the permissions for 0400 really are what we want here, otherwise any user can read from this file. [fixed formatting, added changelog, and made attribute static - gregkh] Reported-by: Wade Mealing <wmealing@redhat.com> Cc: stable <stable@vger.kernel.org> Fixes:f40609d159
("zram: convert remaining CLASS_ATTR() to CLASS_ATTR_RO()") Link: https://bugzilla.redhat.com/show_bug.cgi?id=1847832 Reviewed-by: Steffen Maier <maier@linux.ibm.com> Acked-by: Minchan Kim <minchan@kernel.org> Link: https://lore.kernel.org/r/20200617114946.GA2131650@kroah.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5612e29ba1
commit
5cd9ec70b9
1 changed files with 2 additions and 1 deletions
|
@ -1648,7 +1648,8 @@ static ssize_t hot_add_show(struct class *class,
|
|||
return ret;
|
||||
return scnprintf(buf, PAGE_SIZE, "%d\n", ret);
|
||||
}
|
||||
static CLASS_ATTR_RO(hot_add);
|
||||
static struct class_attribute class_attr_hot_add =
|
||||
__ATTR(hot_add, 0400, hot_add_show, NULL);
|
||||
|
||||
static ssize_t hot_remove_store(struct class *class,
|
||||
struct class_attribute *attr,
|
||||
|
|
Loading…
Reference in a new issue