read/write on attribute w/o show/store should return -ENOSYS
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 7 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | sysfs: if show/store is missing return -ENOSYSfs/ fs/ | +14 | 0 replies | |
| 1/5 | sysfs: if show/store is missing return -EIOfs/ fs/ | +4 | 0 replies | |
| 2/5 | sysfs: (driver/base) if show/store is missing return -ENOSYSdrivers/ drivers/ drivers/ +1 more | +8 | 0 replies | |
| 2/5 | sysfs: (driver/base) if show/store is missing return -EIOdrivers/ drivers/ drivers/ +1 more | +8 | 0 replies | |
| 3/5 | sysfs: (driver/pci) if show/store is missing return -ENOSYSdrivers/ drivers/ drivers/ | +17 | 0 replies | |
| 3/5 | sysfs: (driver/pci) if show/store is missing return -EIOdrivers/ drivers/ drivers/ | +17 | 0 replies | |
| 4/5 | sysfs: (driver/block) if show/store is missing return -ENOSYSdrivers/ drivers/ drivers/ +2 more | +9 | 0 replies | |
| 4/5 | sysfs: (driver/block) if show/store is missing return -EIOdrivers/ drivers/ drivers/ +2 more | +9 | 0 replies | |
| 5/5 | sysfs: (rest) if show/store is missing return -ENOSYSdrivers/ drivers/ drivers/ +4 more | +12 | 0 replies | |
| 5/5 | sysfs: (rest) if show/store is missing return -EIOdrivers/ drivers/ drivers/ +4 more | +12 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC/PATCH 0/5] read/write on attribute w/o show/store should return -ENOSYS
Hi,
Jean Delvare has noticed that if a driver happens to declare its attribute as RW but doesn't provide store() method attempt to write into such attribute will cause spinning process as most of the attribute implementations return 0 in case of missing store causing endless retries. In some cases missing show/store will return -EPERM, -EACCESS or -EINVAL.
I think we should unify implementations and have them all return -ENOSYS (function not implemented) when corresponding method (show/store) is missing.
Signature · 1 line
Dmitry