1. 24 Aug, 2009 1 commit
  2. 04 Aug, 2009 1 commit
  3. 25 Jun, 2009 1 commit
  4. 20 Jul, 2009 1 commit
  5. 03 Aug, 2009 1 commit
  6. 03 Sep, 2009 1 commit
  7. 02 Sep, 2009 1 commit
  8. 24 Aug, 2009 2 commits
  9. 25 Jun, 2009 1 commit
  10. 26 Aug, 2009 1 commit
  11. 11 Aug, 2009 2 commits
  12. 15 Jul, 2009 3 commits
  13. 23 Jul, 2009 1 commit
  14. 30 Jul, 2009 1 commit
  15. 24 Aug, 2009 1 commit
  16. 10 Sep, 2009 1 commit
    • Alexey Dobriyan's avatar
      It's unused. · f3725c8c
      Alexey Dobriyan authored
      It isn't needed -- read or write flag is already passed and sysctl
      shouldn't care about the rest.
      
      It _was_ used in two places at arch/frv for some reason.
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: James Morris <jmorris@namei.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      f3725c8c
  17. 24 Aug, 2009 1 commit
  18. 10 Sep, 2009 1 commit
  19. 17 Aug, 2009 1 commit
  20. 12 Aug, 2009 1 commit
    • Nils Carlson's avatar
      The periodic interrupt from drivers/char/hpet.c does not work correctly, · 7a6c798b
      Nils Carlson authored
      both when using the periodic capability of the hardware and while
      emulating the periodic interrupt (when hardware does not support periodic
      mode).
      
      With timers capable of periodic interrupts, the comparator field is first
      set with the period value followed by set of hidden accumulator, which has
      the side effect of overwriting the comparator value.  This results in
      wrong periodicity for the interrupts.  For, periodic interrupts to work,
      following steps are necessary, in that order.
      
      * Set config with Tn_VAL_SET_CNF bit
      
      * Write to hidden accumulator, the value written is the time when the
        first interrupt should be generated
      
      * Write compartor with period interval for subsequent interrupts
        (http://www.intel.com/hardwaredesign/hpetspec_1.pdf )
      
      When emulating periodic timer with timers not capable of periodic
      interrupt, driver is adding the period to counter value instead of
      comparator value, which causes slow drift when using this emulation.
      
      Also, driver seems to add hpetp->hp_delta both while setting up periodic
      interrupt and while emulating periodic interrupts with timers not capable
      of doing periodic interrupts.  This hp_delta will result in slower than
      expected interrupt rate and should not be used while setting the interval.
      Signed-off-by: default avatarVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: default avatarNils Carlson <nils.carlson@ericsson.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      7a6c798b
  21. 04 Aug, 2009 1 commit
  22. 24 Aug, 2009 2 commits
  23. 18 Aug, 2009 1 commit
    • Renzo Davoli's avatar
      There are two useless lines in fs/char_dev.c. · 5529cb8a
      Renzo Davoli authored
      In register_chrdev there is a loop to change all '/' into '!' in the
      kernel object name.
      This code is useless as the same substitution is in kobject_set_name_vargs in
      lib/kobject.c:
      228         /* ewww... some of these buggers have '/' in the name ... */
      229         while ((s = strchr(kobj->name, '/')))
      230                 s[0] = '!';
      
      kobject_set_name_vargs is called by kobject_set_name.
      kobject_set_name is called just above the useless loop.
      Signed-off-by: default avatarRenzo Davoli <renzo@cs.unibo.it>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      5529cb8a
  24. 21 Jul, 2009 1 commit
  25. 02 Jul, 2009 1 commit
  26. 20 Jul, 2009 1 commit
  27. 01 Jul, 2009 2 commits
  28. 23 Jul, 2009 1 commit
    • Lai Jiangshan's avatar
      _cpu_down() changes the current task's affinity and then recovers it at · 0fdcbb46
      Lai Jiangshan authored
      the end.
      
      It has two problems:
      
      1) The recovery of the current tasks's cpus_allowed will fail under
         some conditions.
      
         # grep Cpus_allowed_list /proc/$$/status
         Cpus_allowed_list:      0-3
      
         # taskset -pc 2 $$
         pid 29075's current affinity list: 0-3
         pid 29075's new affinity list: 2
      
         # grep Cpus_allowed_list /proc/$$/status
         Cpus_allowed_list:      2
      
         # echo 0 > /sys/devices/system/cpu/cpu2/online
      
         # grep Cpus_allowed_list /proc/$$/status
         Cpus_allowed_list:      0
      
         Here, the Cpus_allowed_list was originally "2" and has become
         "0-1,3" after cpu #2 is offlined.
      
         This "Cpus_allowed_list:      0" is incorrect.
      
      2) If the current task is a userspace task, the user may change its
         cpu-affinity during the CPU hot-unplugging.  This change can be
         overwritten when _cpu_down() changes the current task's affinity.
      
      
      Fix all this by not changing the current tasks's affinity.  Instead we
      create a kernel thread to do the work.
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      0fdcbb46
  29. 28 Jul, 2009 1 commit
    • Oleg Nesterov's avatar
      sys_delete_module() can set MODULE_STATE_GOING after · dfdcb38a
      Oleg Nesterov authored
      search_binary_handler() does try_module_get().  In this case
      set_binfmt()->try_module_get() fails but since none of the callers
      check the returned error, the task will run with the wrong old
      ->binfmt.
      
      The proper fix should change all ->load_binary() methods, but we can
      rely on fact that the caller must hold a reference to binfmt->module
      and use __module_get() which never fails.
      Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
      Cc: Roland McGrath <roland@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      dfdcb38a
  30. 22 Jul, 2009 2 commits
    • Neil Horman's avatar
      Allow core_pattern pipes to wait for user space to complete · 00c67933
      Neil Horman authored
      One of the things that user space processes like to do is look at metadata
      for a crashing process in their /proc/<pid> directory.  this is racy
      however, since do_coredump in the kernel doesn't wait for the user space
      process to complete before it reaps the crashing process.  This patch
      corrects that.  Allowing the kernel to wait for the user space process to
      complete before cleaning up the crashing process.  This is a bit tricky to
      do for a few reasons:
      
      1) The user space process isn't our child, so we can't sys_wait4 on it
      2) We need to close the pipe before waiting for the user process to complete,
      since the user process may rely on an EOF condition
      
      I've discussed several solutions with Oleg Nesterov off-list about this,
      and this is the one we've come up with.  We add ourselves as a pipe reader
      (to prevent premature cleanup of the pipe_inode_info), and remove
      ourselves as a writer (to provide an EOF condition to the writer in user
      space), then we iterate until the user space process exits (which we
      detect by pipe->readers == 1, hence the > 1 check in the loop).  When we
      exit the loop, we restore the proper reader/writer values, then we return
      and let filp_close in do_coredump clean up the pipe data properly.
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Reported-by: default avatarEarl Chew <earl_chew@agilent.com>
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      00c67933
    • Andrew Morton's avatar
      ERROR: code indent should use tabs where possible · cbee3c33
      Andrew Morton authored
      #115: FILE: fs/exec.c:1838:
      + ^I^Iif (call_usermodehelper_pipe(helper_argv[0], helper_argv, NULL,$
      
      ERROR: code indent should use tabs where possible
      #120: FILE: fs/exec.c:1842:
      + ^I^I^Igoto fail_dropcount;$
      
      WARNING: externs should be avoided in .c files
      #149: FILE: kernel/sysctl.c:80:
      +extern unsigned int core_pipe_limit;
      
      total: 2 errors, 1 warnings, 120 lines checked
      
      ./patches/exec-let-do_coredump-limit-the-number-of-concurrent-dumps-to-pipes-v9.patch has style problems, please review.  If any of these errors
      are false positives report them to the maintainer, see
      CHECKPATCH in MAINTAINERS.
      
      Please run checkpatch prior to sending patches
      
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      cbee3c33
  31. 24 Aug, 2009 1 commit
    • Neil Horman's avatar
      Introduce core pipe limiting sysctl. · d4a72aff
      Neil Horman authored
      Since we can dump cores to pipe, rather than directly to the filesystem,
      we create a condition in which a user can create a very high load on the
      system simply by running bad applications.
      
      If the pipe reader specified in core_pattern is poorly written, we can
      have lots of ourstandig resources and processes in the system.
      
      This sysctl introduces an ability to limit that resource consumption. 
      core_pipe_limit defines how many in-flight dumps may be run in parallel,
      dumps beyond this value are skipped and a note is made in the kernel log. 
      A special value of 0 in core_pipe_limit denotes unlimited core dumps may
      be handled (this is the default value).
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Reported-by: default avatarEarl Chew <earl_chew@agilent.com>
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      d4a72aff
  32. 22 Jul, 2009 2 commits
    • Andrew Morton's avatar
      WARNING: suspect code indent for conditional statements (16, 25) · c717903f
      Andrew Morton authored
      #48: FILE: fs/exec.c:1796:
      +		if (core_limit == 0) {
      +			 /*
      
      WARNING: line over 80 characters
      #57: FILE: fs/exec.c:1805:
      +			  * but it runs as root, and can do lots of stupid things
      
      WARNING: line over 80 characters
      #58: FILE: fs/exec.c:1806:
      +			  * Note that we use task_tgid_vnr here to grab the pid of the
      
      WARNING: line over 80 characters
      #59: FILE: fs/exec.c:1807:
      +			  * process group leader.  That way we get the right pid if a thread
      
      total: 0 errors, 4 warnings, 59 lines checked
      
      ./patches/exec-make-do_coredump-more-resilient-to-recursive-crashes-v9.patch has style problems, please review.  If any of these errors
      are false positives report them to the maintainer, see
      CHECKPATCH in MAINTAINERS.
      
      Please run checkpatch prior to sending patches
      
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      c717903f
    • Neil Horman's avatar
      Change how we detect recursive dumps. · 45262796
      Neil Horman authored
      Currently we have a mechanism by which we try to compare pathnames of the
      crashing process to the core_pattern path.  This is broken for a dozen
      reasons, and just doesn't work in any sort of robust way.
      
      I'm replacing it with the use of a 0 RLIMIT_CORE value.  Since helper apps
      set RLIMIT_CORE to zero, we don't write out core files for any process
      with that particular limit set.  It the core_pattern is a pipe, any
      non-zero limit is translated to RLIM_INFINITY.
      
      This allows complete dumps to be captured, but prevents infinite recursion
      in the event that the core_pattern process itself crashes.
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Reported-by: default avatarEarl Chew <earl_chew@agilent.com>
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      45262796