1. 03 1月, 2006 34 次提交
  2. 01 1月, 2006 3 次提交
  3. 31 12月, 2005 3 次提交
    • Y
      [PATCH] Fix false old value return of sysctl · 82c9df82
      Yi Yang 提交于
      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: NYi Yang <yang.y.yi@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      82c9df82
    • L
      sysctl: don't overflow the user-supplied buffer with '\0' · 8febdd85
      Linus Torvalds 提交于
      If the string was too long to fit in the user-supplied buffer,
      the sysctl layer would zero-terminate it by writing past the
      end of the buffer. Don't do that.
      
      Noticed by Yi Yang <yang.y.yi@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8febdd85
    • L
      Insanity avoidance in /proc · 8b90db0d
      Linus Torvalds 提交于
      The old /proc interfaces were never updated to use loff_t, and are just
      generally broken.  Now, we should be using the seq_file interface for
      all of the proc files, but converting the legacy functions is more work
      than most people care for and has little upside..
      
      But at least we can make the non-LFS rules explicit, rather than just
      insanely wrapping the offset or something.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8b90db0d