mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
Revert "zram: convert remaining CLASS_ATTR() to CLASS_ATTR_RO()"
commit 853eab68afc80f59f36bbdeb715e5c88c501e680 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 <[email protected]>
Cc: stable <[email protected]>
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 <[email protected]>
Acked-by: Minchan Kim <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
4dd2ad6867
commit
72648019cd
1 changed files with 2 additions and 1 deletions
|
|
@ -2023,7 +2023,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