diff options
| author | Alexey Dobriyan <[email protected]> | 2007-02-10 01:44:39 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2007-02-11 10:51:24 -0800 |
| commit | 3ee75ac3c0f4904633322b7d9b111566fbc4a7d3 (patch) | |
| tree | 2456021d63e95e92ce6bfae2e1f9d83c1843319d /include/linux/debugobjects.h | |
| parent | 8b6312f4dcc1efe7975731b6c47dd134282bd9ac (diff) | |
[PATCH] sysctl_{,ms_}jiffies: fix oldlen semantics
currently it's
1) if *oldlenp == 0,
don't writeback anything
2) if *oldlenp >= table->maxlen,
don't writeback more than table->maxlen bytes and rewrite *oldlenp
don't look at underlying type granularity
3) if 0 < *oldlenp < table->maxlen,
*cough*
string sysctls don't writeback more than *oldlenp bytes.
OK, that's because sizeof(char) == 1
int sysctls writeback anything in (0, table->maxlen] range
Though accept integers divisible by sizeof(int) for writing.
sysctl_jiffies and sysctl_ms_jiffies don't writeback anything but
sizeof(int), which violates 1) and 2).
So, make sysctl_jiffies and sysctl_ms_jiffies accept
a) *oldlenp == 0, not doing writeback
b) *oldlenp >= sizeof(int), writing one integer.
-EINVAL still returned for *oldlenp == 1, 2, 3.
Signed-off-by: Alexey Dobriyan <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions