You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[PATCH] sysfs: (rest) if show/store is missing return -EIO
sysfs: fix the rest of the kernel so if an attribute doesn't
implement show or store method read/write will return
-EIO instead of 0 or -EINVAL or -EPERM.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6c1852a08e
commit
70f2817a43
+2
-2
@@ -629,7 +629,7 @@ static ssize_t module_attr_show(struct kobject *kobj,
|
||||
mk = to_module_kobject(kobj);
|
||||
|
||||
if (!attribute->show)
|
||||
return -EPERM;
|
||||
return -EIO;
|
||||
|
||||
if (!try_module_get(mk->mod))
|
||||
return -ENODEV;
|
||||
@@ -653,7 +653,7 @@ static ssize_t module_attr_store(struct kobject *kobj,
|
||||
mk = to_module_kobject(kobj);
|
||||
|
||||
if (!attribute->store)
|
||||
return -EPERM;
|
||||
return -EIO;
|
||||
|
||||
if (!try_module_get(mk->mod))
|
||||
return -ENODEV;
|
||||
|
||||
Reference in New Issue
Block a user