1. 23 Mar, 2006 11 commits
    • Chuck Ebbert's avatar
      [PATCH] i386: __devinit should be __cpuinit · 3bc9b76b
      Chuck Ebbert authored
      
      
      Several places in arch/i386/kernel/cpu and kernel/cpu were using __devinit
      when they should have been __cpuinit.  Fixing that saves ~4K when
      CONFIG_HOTPLUG && !CONFIG_HOTPLUG_CPU.
      
      Noticed by Andrew Morton.
      Signed-off-by: default avatarChuck Ebbert <76306.1226@compuserve.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      3bc9b76b
    • Gerd Hoffmann's avatar
      [PATCH] x86: SMP alternatives · 9a0b5817
      Gerd Hoffmann authored
      
      
      Implement SMP alternatives, i.e.  switching at runtime between different
      code versions for UP and SMP.  The code can patch both SMP->UP and UP->SMP.
      The UP->SMP case is useful for CPU hotplug.
      
      With CONFIG_CPU_HOTPLUG enabled the code switches to UP at boot time and
      when the number of CPUs goes down to 1, and switches to SMP when the number
      of CPUs goes up to 2.
      
      Without CONFIG_CPU_HOTPLUG or on non-SMP-capable systems the code is
      patched once at boot time (if needed) and the tables are released
      afterwards.
      
      The changes in detail:
      
        * The current alternatives bits are moved to a separate file,
          the SMP alternatives code is added there.
      
        * The patch adds some new elf sections to the kernel:
          .smp_altinstructions
      	like .altinstructions, also contains a list
      	of alt_instr structs.
          .smp_altinstr_replacement
      	like .altinstr_replacement, but also has some space to
      	save original instruction before replaving it.
          .smp_locks
      	list of pointers to lock prefixes which can be nop'ed
      	out on UP.
          The first two are used to replace more complex instruction
          sequences such as spinlocks and semaphores.  It would be possible
          to deal with the lock prefixes with that as well, but by handling
          them as special case the table sizes become much smaller.
      
       * The sections are page-aligned and padded up to page size, so they
         can be free if they are not needed.
      
       * Splitted the code to release init pages to a separate function and
         use it to release the elf sections if they are unused.
      Signed-off-by: default avatarGerd Hoffmann <kraxel@suse.de>
      Signed-off-by: default avatarChuck Ebbert <76306.1226@compuserve.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      9a0b5817
    • Chuck Ebbert's avatar
      [PATCH] i386: multi-column stack backtraces · 4d7d8c82
      Chuck Ebbert authored
      
      
      Print stack backtraces in multiple columns, saving screen space.  Number of
      columns is configurable and defaults to one so behavior is
      backwards-compatible.
      
      Also removes the brackets around addresses when printing more
      that one entry per line so they print as:
          <address>
      instead of:
          [<address>]
      This helps multiple entries fit better on one line.
      
      Original idea by Dave Jones, taken from x86_64.
      Signed-off-by: default avatarChuck Ebbert <76306.1226@compuserve.com>
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      4d7d8c82
    • Ingo Molnar's avatar
      [PATCH] Make CONFIG_REGPARM enabled by default · b824eb60
      Ingo Molnar authored
      
      
      Make CONFIG_REGPARM enabled by default.  It's a noticable win both for size
      and for performance, and gcc[34] handles it correctly.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      b824eb60
    • Adrian Bunk's avatar
      [PATCH] i386: let REGPARM no longer depend on EXPERIMENTAL · 69ef4141
      Adrian Bunk authored
      
      
      REGPARM has already gotten much testing, what about removing the
      dependency on EXPERIMENTAL?
      
      Additionally, this patch does:
      - remove the useless "default n"
      - remove note regarding binary only modules (nowadays, there are even
        some binary only modules compiled with REGPARM=y available)
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      69ef4141
    • Davi Arnaut's avatar
      [PATCH] Bug fixes and cleanup for the BSD Secure Levels LSM · 6bb08da4
      Davi Arnaut authored
      
      
      This patch address several issues in the current BSD Secure Levels code:
      
      o plaintext_to_sha1: Missing check for a NULL return from __get_free_page
      
      o passwd_write_file: A page is leaked if the password is wrong.
      
      o fix securityfs registration order
      
      o seclvl_init is a mess and can't properly tolerate failures, failure
        path is upside down (deldif and delf should be switched)
      
      Cleanups:
      
      o plaintext_to_sha1: Use buffers passed in
      o passwd_write_file: Use kmalloc() instead of get_zeroed_page()
      o passwd_write_file: hashedPassword comparison is just memcmp
      o s/ENOSYS/EINVAL/
      o misc
      
      (akpm: after some discussion it appears that the BSD secure levels feature
      should be scheduled for removal.  But for now, let's fix these problems up).
      Signed-off-by: default avatarDavi Arnaut <davi.arnaut@gmail.com>
      Cc: Michael Halcrow <mhalcrow@us.ibm.com>
      Cc: Chris Wright <chrisw@sous-sol.org>
      Cc: Stephen Smalley <sds@epoch.ncsc.mil>
      Cc: James Morris <jmorris@namei.org>
      Cc: Serge Hallyn <serue@us.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      6bb08da4
    • Patrick McHardy's avatar
      [PATCH] cciss: fix use-after-free in cciss_init_one · 61808c2b
      Patrick McHardy authored
      
      
      free_hba() sets hba[i] to NULL, the dereference afterwards results in this
      crash.  Setting busy_initializing to 0 actually looks unnecessary, but I'm
      not entirely sure, which is why I left it in.
      
      cciss: controller appears to be disabled
      Unable to handle kernel NULL pointer dereference at virtual address 00000370
       printing eip:
      c1114d53
      *pde = 00000000
      Oops: 0002 [#1]
      Modules linked in:
      CPU:    0
      EIP:    0060:[<c1114d53>]    Not tainted VLI
      EFLAGS: 00010286   (2.6.16 #1)
      EIP is at cciss_init_one+0x4e9/0x4fe
      eax: 00000000   ebx: c132cd60   ecx: c13154e4   edx: c27d3c00
      esi: 00000000   edi: c2748800   ebp: c2536ee4   esp: c2536eb8
      ds: 007b   es: 007b   ss: 0068
      Process swapper (pid: 1, threadinfo=c2536000 task=c2535a30)
      Stack: <0>00000000 00000000 00000000 c13fdba0 c2536ee8 c13159c0 c2536f38
      f7c74740
             c132cd60 c132cd60 ffffffed c2536ef0 c10c1d51 c2748800 c2536f04
      c10c1d85
             c132cd60 c2748800 c132cd8c c2536f14 c10c1db8 c2748848 00000000
      c2536f28
      Call Trace:
       [<c10031d5>] show_stack_log_lvl+0xa8/0xb0
       [<c1003305>] show_registers+0x102/0x16a
       [<c10034a2>] die+0xc1/0x13c
       [<c1288160>] do_page_fault+0x38a/0x525
       [<c1002e9b>] error_code+0x4f/0x54
       [<c10c1d51>] pci_call_probe+0xd/0x10
       [<c10c1d85>] __pci_device_probe+0x31/0x43
       [<c10c1db8>] pci_device_probe+0x21/0x34
       [<c110a654>] driver_probe_device+0x44/0x99
       [<c110a73f>] __driver_attach+0x39/0x5d
       [<c1109e1c>] bus_for_each_dev+0x35/0x5a
       [<c110a777>] driver_attach+0x14/0x16
       [<c110a220>] bus_add_driver+0x5c/0x8f
       [<c110ab22>] driver_register+0x73/0x78
       [<c10c1f6d>] __pci_register_driver+0x5f/0x71
       [<c13bf935>] cciss_init+0x1a/0x1c
       [<c13aa718>] do_initcalls+0x4c/0x96
       [<c13aa77e>] do_basic_setup+0x1c/0x1e
       [<c10002b1>] init+0x35/0x118
       [<c1000cf5>] kernel_thread_helper+0x5/0xb
      Code: 04 b5 e0 de 40 c1 8d 50 04 8b 40 34 e8 3f b7 f9 ff 8b 04 b5 e0 de
      40 c1 e8 aa f3 ff ff 89 f0 e8 e8 fa ff ff 8b 04 b5 e0 de 40 c1 <c7> 80
      70 03 00 00 00 00 00 00 83 c8 ff 8d 65 f4 5b 5e 5f 5d c3
       <0>Kernel panic - not syncing: Attempted to kill init!
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Cc: <mike.miller@hp.com>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      61808c2b
    • NeilBrown's avatar
      [PATCH] DM: Fix bug: BIO_RW_BARRIER requests to md/raid1 hang. · 9e71f9c8
      NeilBrown authored
      
      
      Both R1BIO_Barrier and R1BIO_Returned are 4 !!!!
      
      This means that barrier requests don't get returned (i.e.  b_endio called)
      because it looks like they already have been.
      Signed-off-by: default avatarNeil Brown <neilb@suse.de>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      9e71f9c8
    • Anton Blanchard's avatar
      [PATCH] fix scheduler deadlock · e9028b0f
      Anton Blanchard authored
      
      
      We have noticed lockups during boot when stress testing kexec on ppc64.
      Two cpus would deadlock in scheduler code trying to grab already taken
      spinlocks.
      
      The double_rq_lock code uses the address of the runqueue to order the
      taking of multiple locks.  This address is a per cpu variable:
      
      	if (rq1 < rq2) {
      		spin_lock(&rq1->lock);
      		spin_lock(&rq2->lock);
      	} else {
      		spin_lock(&rq2->lock);
      		spin_lock(&rq1->lock);
      	}
      
      On the other hand, the code in wake_sleeping_dependent uses the cpu id
      order to grab locks:
      
      	for_each_cpu_mask(i, sibling_map)
      		spin_lock(&cpu_rq(i)->lock);
      
      This means we rely on the address of per cpu data increasing as cpu ids
      increase.  While this will be true for the generic percpu implementation it
      may not be true for arch specific implementations.
      
      One way to solve this is to always take runqueues in cpu id order. To do
      this we add a cpu variable to the runqueue and check it in the
      double runqueue locking functions.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      e9028b0f
    • Neil Horman's avatar
      [PATCH] proc: fix duplicate line in /proc/devices · 5be0e951
      Neil Horman authored
      
      
      Fix a duplicate block device line printed after the "Block device" header
      in /proc/devices.
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      5be0e951
    • Nick Piggin's avatar
      [PATCH] sparc64: fix set_page_count merge clash · fcab1e51
      Nick Piggin authored
      
      
      Merge clash will have broken sparc64. Synch up its online_page
      implementation with powerpc, which was identical until the
      set_page_count removal.
      Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      fcab1e51
  2. 22 Mar, 2006 29 commits