1. 02 11月, 2005 4 次提交
  2. 01 11月, 2005 13 次提交
  3. 31 10月, 2005 23 次提交
    • P
      powerpc: Fix bug arising from having multiple memory_limit variables · cf00a8d1
      Paul Mackerras 提交于
      We had a static memory_limit in prom.c, and then another one defined
      in setup_64.c and used in numa.c, which resulted in the kernel crashing
      when mem=xxx was given on the command line.  This puts the declaration
      in system.h and the definition in mem.c.  This also moves the
      definition of tce_alloc_start/end out of setup_64.c.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      cf00a8d1
    • O
      451cbaa1
    • T
      [PATCH] fix missing includes · 4e57b681
      Tim Schmielau 提交于
      I recently picked up my older work to remove unnecessary #includes of
      sched.h, starting from a patch by Dave Jones to not include sched.h
      from module.h. This reduces the number of indirect includes of sched.h
      by ~300. Another ~400 pointless direct includes can be removed after
      this disentangling (patch to follow later).
      However, quite a few indirect includes need to be fixed up for this.
      
      In order to feed the patches through -mm with as little disturbance as
      possible, I've split out the fixes I accumulated up to now (complete for
      i386 and x86_64, more archs to follow later) and post them before the real
      patch.  This way this large part of the patch is kept simple with only
      adding #includes, and all hunks are independent of each other.  So if any
      hunk rejects or gets in the way of other patches, just drop it.  My scripts
      will pick it up again in the next round.
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4e57b681
    • O
      [PATCH] cleanup the usage of SEND_SIG_xxx constants · 621d3121
      Oleg Nesterov 提交于
      This patch simplifies some checks for magic siginfo values.  It should not
      change the behaviour in any way.
      Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      621d3121
    • P
      [PATCH] sched: hardcode non-smp set_cpus_allowed · 4098f991
      Paul Jackson 提交于
      Simplify the UP (1 CPU) implementatin of set_cpus_allowed.
      
      The one CPU is hardcoded to be cpu 0 - so just test for that bit, and avoid
      having to pick up the cpu_online_map.
      
      Also, unexport cpu_online_map: it was only needed for set_cpus_allowed().
      Signed-off-by: NPaul Jackson <pj@sgi.com>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4098f991
    • A
      [PATCH] semaphore: Remove __MUTEX_INITIALIZER() · 727a53bd
      Arthur Othieno 提交于
      __MUTEX_INITIALIZER() has no users, and equates to the more commonly used
      DECLARE_MUTEX(), thus making it pretty much redundant.  Remove it for good.
      Signed-off-by: NArthur Othieno <a.othieno@bluewin.ch>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      727a53bd
    • P
      [PATCH] RCU torture-testing kernel module · a241ec65
      Paul E. McKenney 提交于
      This patch is a rewrite of the one submitted on October 1st, using modules
      (http://marc.theaimsgroup.com/?l=linux-kernel&m=112819093522998&w=2).
      
      This rewrite adds a tristate CONFIG_RCU_TORTURE_TEST, which enables an
      intense torture test of the RCU infratructure.  This is needed due to the
      continued changes to the RCU infrastructure to accommodate dynamic ticks,
      CPU hotplug, realtime, and so on.  Most of the code is in a separate file
      that is compiled only if the CONFIG variable is set.  Documentation on how
      to run the test and interpret the output is also included.
      
      This code has been tested on i386 and ppc64, and an earlier version of the
      code has received extensive testing on a number of architectures as part of
      the PREEMPT_RT patchset.
      Signed-off-by: N"Paul E. McKenney" <paulmck@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a241ec65
    • N
      [PATCH] include/linux/kernel.h:BUILD_BUG_ON(): fix a comment · c0398ee6
      Nikita Danilov 提交于
      Fix comment describing BUILD_BUG_ON: BUG_ON is not an assertion
      (unfortunately).
      Signed-off-by: NNikita Danilov <nikita@clusterfs.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c0398ee6
    • P
      [PATCH] modules: fix sparse warning for every MODULE_PARM · 52303e8b
      Pavel Roskin 提交于
      sparse complains about every MODULE_PARM used in a module: warning: symbol
      '__parm_foo' was not declared.  Should it be static?
      
      The fix is to split declaration and initialization.  While MODULE_PARM is
      obsolete, it's not something sparse should report.
      Signed-off-by: NPavel Roskin <proski@gnu.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      52303e8b
    • M
      [PATCH] fuse: remove unused define · 6ea05db0
      Miklos Szeredi 提交于
      Setting ctime is implicit in all setattr cases, so the FATTR_CTIME
      definition is unnecessary.
      
      It is used by neither the kernel nor by userspace.
      Signed-off-by: NMiklos Szeredi <miklos@szeredi.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6ea05db0
    • D
      [PATCH] Keys: Add LSM hooks for key management [try #3] · 29db9190
      David Howells 提交于
      The attached patch adds LSM hooks for key management facilities. The notable
      changes are:
      
       (1) The key struct now supports a security pointer for the use of security
           modules. This will permit key labelling and restrictions on which
           programs may access a key.
      
       (2) Security modules get a chance to note (or abort) the allocation of a key.
      
       (3) The key permission checking can now be enhanced by the security modules;
           the permissions check consults LSM if all other checks bear out.
      
       (4) The key permissions checking functions now return an error code rather
           than a boolean value.
      
       (5) An extra permission has been added to govern the modification of
           attributes (UID, GID, permissions).
      
      Note that there isn't an LSM hook specifically for each keyctl() operation,
      but rather the permissions hook allows control of individual operations based
      on the permission request bits.
      
      Key management access control through LSM is enabled by automatically if both
      CONFIG_KEYS and CONFIG_SECURITY are enabled.
      
      This should be applied on top of the patch ensubjected:
      
      	[PATCH] Keys: Possessor permissions should be additive
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NChris Wright <chrisw@osdl.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      29db9190
    • D
      [PATCH] Keys: Export user-defined keyring operations · 2aa349f6
      David Howells 提交于
      Export user-defined key operations so that those who wish to define their
      own key type based on the user-defined key operations may do so (as has
      been requested).
      
      The header file created has been placed into include/keys/user-type.h, thus
      creating a directory where other key types may also be placed.  Any
      objections to doing this?
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      Signed-Off-By: NArjan van de Ven <arjan@infradead.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2aa349f6
    • T
      [PATCH] vm: remove unused/broken page_pte[_prot] macros · 1426d7a8
      Tejun Heo 提交于
      This patch removes page_pte_prot and page_pte macros from all
      architectures.  Some architectures define both, some only page_pte (broken)
      and others none.  These macros are not used anywhere.
      
      page_pte_prot(page, prot) is identical to mk_pte(page, prot) and
      page_pte(page) is identical to page_pte_prot(page, __pgprot(0)).
      
      * The following architectures define both page_pte_prot and page_pte
      
        arm, arm26, ia64, sh64, sparc, sparc64
      
      * The following architectures define only page_pte (broken)
      
        frv, i386, m32r, mips, sh, x86-64
      
      * All other architectures define neither
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      1426d7a8
    • P
      [PATCH] cpusets: automatic numa mempolicy rebinding · 68860ec1
      Paul Jackson 提交于
      This patch automatically updates a tasks NUMA mempolicy when its cpuset
      memory placement changes.  It does so within the context of the task,
      without any need to support low level external mempolicy manipulation.
      
      If a system is not using cpusets, or if running on a system with just the
      root (all-encompassing) cpuset, then this remap is a no-op.  Only when a
      task is moved between cpusets, or a cpusets memory placement is changed
      does the following apply.  Otherwise, the main routine below,
      rebind_policy() is not even called.
      
      When mixing cpusets, scheduler affinity, and NUMA mempolicies, the
      essential role of cpusets is to place jobs (several related tasks) on a set
      of CPUs and Memory Nodes, the essential role of sched_setaffinity is to
      manage a jobs processor placement within its allowed cpuset, and the
      essential role of NUMA mempolicy (mbind, set_mempolicy) is to manage a jobs
      memory placement within its allowed cpuset.
      
      However, CPU affinity and NUMA memory placement are managed within the
      kernel using absolute system wide numbering, not cpuset relative numbering.
      
      This is ok until a job is migrated to a different cpuset, or what's the
      same, a jobs cpuset is moved to different CPUs and Memory Nodes.
      
      Then the CPU affinity and NUMA memory placement of the tasks in the job
      need to be updated, to preserve their cpuset-relative position.  This can
      be done for CPU affinity using sched_setaffinity() from user code, as one
      task can modify anothers CPU affinity.  This cannot be done from an
      external task for NUMA memory placement, as that can only be modified in
      the context of the task using it.
      
      However, it easy enough to remap a tasks NUMA mempolicy automatically when
      a task is migrated, using the existing cpuset mechanism to trigger a
      refresh of a tasks memory placement after its cpuset has changed.  All that
      is needed is the old and new nodemask, and notice to the task that it needs
      to rebind its mempolicy.  The tasks mems_allowed has the old mask, the
      tasks cpuset has the new mask, and the existing
      cpuset_update_current_mems_allowed() mechanism provides the notice.  The
      bitmap/cpumask/nodemask remap operators provide the cpuset relative
      calculations.
      
      This patch leaves open a couple of issues:
      
       1) Updating vma and shmfs/tmpfs/hugetlbfs memory policies:
      
          These mempolicies may reference nodes outside of those allowed to
          the current task by its cpuset.  Tasks are migrated as part of jobs,
          which reside on what might be several cpusets in a subtree.  When such
          a job is migrated, all NUMA memory policy references to nodes within
          that cpuset subtree should be translated, and references to any nodes
          outside that subtree should be left untouched.  A future patch will
          provide the cpuset mechanism needed to mark such subtrees.  With that
          patch, we will be able to correctly migrate these other memory policies
          across a job migration.
      
       2) Updating cpuset, affinity and memory policies in user space:
      
          This is harder.  Any placement state stored in user space using
          system-wide numbering will be invalidated across a migration.  More
          work will be required to provide user code with a migration-safe means
          to manage its cpuset relative placement, while preserving the current
          API's that pass system wide numbers, not cpuset relative numbers across
          the kernel-user boundary.
      Signed-off-by: NPaul Jackson <pj@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      68860ec1
    • P
      [PATCH] cpusets: bitmap and mask remap operators · fb5eeeee
      Paul Jackson 提交于
      In the forthcoming task migration support, a key calculation will be
      mapping cpu and node numbers from the old set to the new set while
      preserving cpuset-relative offset.
      
      For example, if a task and its pages on nodes 8-11 are being migrated to
      nodes 24-27, then pages on node 9 (the 2nd node in the old set) should be
      moved to node 25 (the 2nd node in the new set.)
      
      As with other bitmap operations, the proper way to code this is to provide
      the underlying calculation in lib/bitmap.c, and then to provide the usual
      cpumask and nodemask wrappers.
      
      This patch provides that.  These operations are termed 'remap' operations.
      Both remapping a single bit and a set of bits is supported.
      Signed-off-by: NPaul Jackson <pj@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      fb5eeeee
    • P
      [PATCH] cpusets: dual semaphore locking overhaul · 053199ed
      Paul Jackson 提交于
      Overhaul cpuset locking.  Replace single semaphore with two semaphores.
      
      The suggestion to use two locks was made by Roman Zippel.
      
      Both locks are global.  Code that wants to modify cpusets must first
      acquire the exclusive manage_sem, which allows them read-only access to
      cpusets, and holds off other would-be modifiers.  Before making actual
      changes, the second semaphore, callback_sem must be acquired as well.  Code
      that needs only to query cpusets must acquire callback_sem, which is also a
      global exclusive lock.
      
      The earlier problems with double tripping are avoided, because it is
      allowed for holders of manage_sem to nest the second callback_sem lock, and
      only callback_sem is needed by code called from within __alloc_pages(),
      where the double tripping had been possible.
      
      This is not quite the same as a normal read/write semaphore, because
      obtaining read-only access with intent to change must hold off other such
      attempts, while allowing read-only access w/o such intention.  Changing
      cpusets involves several related checks and changes, which must be done
      while allowing read-only queries (to avoid the double trip), but while
      ensuring nothing changes (holding off other would be modifiers.)
      
      This overhaul of cpuset locking also makes careful use of task_lock() to
      guard access to the task->cpuset pointer, closing a couple of race
      conditions noticed while reading this code (thanks, Roman).  I've never
      seen these races fail in any use or test.
      
      See further the comments in the code.
      Signed-off-by: NPaul Jackson <pj@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      053199ed
    • A
      [PATCH] add_timer() of a pending timer is illegal · 15d2bace
      Andrew Morton 提交于
      In the recent timer rework we lost the check for an add_timer() of an
      already-pending timer.  That check was useful for networking, so put it back.
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      15d2bace
    • C
      [PATCH] unify sys_ptrace prototype · dfb7dac3
      Christoph Hellwig 提交于
      Make sure we always return, as all syscalls should.  Also move the common
      prototype to <linux/syscalls.h>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NMiklos Szeredi <miklos@szeredi.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      dfb7dac3
    • C
      [PATCH] adjust parisc sys_ptrace prototype · 7024a9b8
      Christoph Hellwig 提交于
      Make the pid argument a long as on every other arcihtecture.  Despite pid_t
      beeing a 32bit type even on 64bit parisc this is not an ABI change due to
      the parisc calling conventions.  And even if it did it wouldn't matter too
      much because 64bit userspace on parisc is in an embrionic stage.
      Acked-by: NMatthew Wilcox <matthew@wil.cx>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7024a9b8
    • O
      [PATCH] kill sigqueue->lock · 19a4fcb5
      Oleg Nesterov 提交于
      This lock is used in sigqueue_free(), but it is always equal to
      current->sighand->siglock, so we don't need to keep it in the struct
      sigqueue.
      Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      19a4fcb5
    • E
      [PATCH] reduce sizeof(struct file) · 2f512016
      Eric Dumazet 提交于
      Now that RCU applied on 'struct file' seems stable, we can place f_rcuhead
      in a memory location that is not anymore used at call_rcu(&f->f_rcuhead,
      file_free_rcu) time, to reduce the size of this critical kernel object.
      
      The trick I used is to move f_rcuhead and f_list in an union called f_u
      
      The callers are changed so that f_rcuhead becomes f_u.fu_rcuhead and f_list
      becomes f_u.f_list
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2f512016
    • A
      [PATCH] remove timer debug field · dfc4f94d
      Andrew Morton 提交于
      Remove timer_list.magic and associated debugging code.
      
      I originally added this when a spinlock was added to timer_list - this meant
      that an all-zeroes timer became illegal and init_timer() was required.
      
      That spinlock isn't even there any more, although timer.base must now be
      initialised.
      
      I'll keep this debugging code in -mm.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      dfc4f94d
    • J
      [PATCH] remove some more check_region stuff · d61780c0
      Jeff Garzik 提交于
      Removed some more references to check_region().
      
      I checked these changes into the 'checkreg' branch of
      rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6.git
      
      The only valid references remaining are in:
      drivers/scsi/advansys.c
      drivers/scsi/BusLogic.c
      drivers/cdrom/sbpcd.c
      sound/oss/pss.c
      
        Remove last vestiges of ide_check_region()
        drivers/char/specialix: trim trailing whitespace
        drivers/char/specialix: eliminate use of check_region()
        Remove outdated and unused references to check_region()
        [sound oss] remove check_region() usage from cs4232, wavfront
        [netdrvr eepro] trim trailing whitespace
        [netdrvr eepro] remove check_region() usage
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d61780c0