diff options
author | Yi Yang <yang.y.yi@gmail.com> | 2005-12-30 16:37:10 +0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-30 17:22:08 -0800 |
commit | 82c9df820112c6286a8e8fbe482e94b65b49062c (patch) | |
tree | 6f52b0ae3db256de9a3ac46083229d96f2d130e9 /drivers/w1/w1_ds2433.c | |
parent | 8febdd85adaa41fa1fc1cb31286210fc2cd3ed0c (diff) | |
download | op-kernel-dev-82c9df820112c6286a8e8fbe482e94b65b49062c.zip op-kernel-dev-82c9df820112c6286a8e8fbe482e94b65b49062c.tar.gz |
[PATCH] Fix false old value return of sysctl
For the sysctl syscall, if the user wants to get the old value of a
sysctl entry and set a new value for it in the same syscall, the old
value is always overwritten by the new value if the sysctl entry is of
string type and if the user sets its strategy to sysctl_string. This
issue lies in the strategy being run twice if the strategy is set to
sysctl_string, the general strategy sysctl_string always returns 0 if
success.
Such strategy routines as sysctl_jiffies and sysctl_jiffies_ms return 1
because they do read and write for the sysctl entry.
The strategy routine sysctl_string return 0 although it actually read
and write the sysctl entry.
According to my analysis, if a strategy routine do read and write, it
should return 1, if it just does some necessary check but not read and
write, it should return 0, for example sysctl_intvec.
Signed-off-by: Yi Yang <yang.y.yi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/w1/w1_ds2433.c')
0 files changed, 0 insertions, 0 deletions