diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-12-06 15:20:51 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-12-06 15:20:51 -0800 |
commit | dabe589657ad0f9a0d6f4101e2171574f74b00bf (patch) | |
tree | 60c1c779e316718f58dc4093a9585d980db2bdba /include | |
parent | 07eca14b6fdd0ccc52ed9127aa6924507261a907 (diff) | |
parent | 0b02e448a2ebb46eb9be4f1bdfc87112bd420cbf (diff) |
Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull EFI fixes from Ingo Molnar:
"Misc fixes: world-readable pointer removal from sysfs, a ESRT kfree()
bug fix and a comment update"
* 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
efi: Add comment to avoid future expanding of sysfs systab
efi/esrt: Use memunmap() instead of kfree() to free the remapping
efi: Move some sysfs files to be read-only by root
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sysfs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index e32dfe098e82..40839c02d28c 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -117,6 +117,12 @@ struct attribute_group { .show = _name##_show, \ } +#define __ATTR_RO_MODE(_name, _mode) { \ + .attr = { .name = __stringify(_name), \ + .mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \ + .show = _name##_show, \ +} + #define __ATTR_WO(_name) { \ .attr = { .name = __stringify(_name), .mode = S_IWUSR }, \ .store = _name##_store, \ |