1. 14 May, 2010 3 commits
  2. 11 May, 2010 5 commits
  3. 10 May, 2010 3 commits
  4. 03 May, 2010 1 commit
  5. 27 Apr, 2010 1 commit
  6. 26 Apr, 2010 2 commits
  7. 23 Apr, 2010 2 commits
  8. 22 Apr, 2010 13 commits
  9. 21 Apr, 2010 10 commits
    • David Howells's avatar
      CRED: Fix a race in creds_are_invalid() in credentials debugging · e134d200
      David Howells authored
      creds_are_invalid() reads both cred->usage and cred->subscribers and then
      compares them to make sure the number of processes subscribed to a cred struct
      never exceeds the refcount of that cred struct.
      
      The problem is that this can cause a race with both copy_creds() and
      exit_creds() as the two counters, whilst they are of atomic_t type, are only
      atomic with respect to themselves, and not atomic with respect to each other.
      
      This means that if creds_are_invalid() can read the values on one CPU whilst
      they're being modified on another CPU, and so can observe an evolving state in
      which the subscribers count now is greater than the usage count a moment
      before.
      
      Switching the order in which the counts are read cannot help, so the thing to
      do is to remove that particular check.
      
      I had considered rechecking the values to see if they're in flux if the test
      fails, but I can't guarantee they won't appear the same, even if they've
      changed several times in the meantime.
      
      Note that this can only happen if CONFIG_DEBUG_CREDENTIALS is enabled.
      
      The problem is only likely to occur with multithreaded programs, and can be
      tested by the tst-eintr1 program from glibc's "make check".  The symptoms look
      like:
      
      	CRED: Invalid credentials
      	CRED: At include/linux/cred.h:240
      	CRED: Specified credentials: ffff88003dda5878 [real][eff]
      	CRED: ->magic=43736564, put_addr=(null)
      	CRED: ->usage=766, subscr=766
      	CRED: ->*uid = { 0,0,0,0 }
      	CRED: ->*gid = { 0,0,0,0 }
      	CRED: ->security is ffff88003d72f538
      	CRED: ->security {359, 359}
      	------------[ cut here ]------------
      	kernel BUG at kernel/cred.c:850!
      	...
      	RIP: 0010:[<ffffffff81049889>]  [<ffffffff81049889>] __invalid_creds+0x4e/0x52
      	...
      	Call Trace:
      	 [<ffffffff8104a37b>] copy_creds+0x6b/0x23f
      
      Note the ->usage=766 and subscr=766.  The values appear the same because
      they've been re-read since the check was made.
      Reported-by: default avatarRoland McGrath <roland@redhat.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      e134d200
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu · 1ef6ce7a
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
        m68knommu: allow 4 coldfire serial ports
        m68knommu: fix coldfire tcdrain
        m68knommu: remove a duplicate vector setting line for 68360
        Fix m68k-uclinux's rt_sigreturn trampoline
        m68knommu: correct the CC flags for Coldfire M5272 targets
        uclinux: error message when FLAT reloc symbol is invalid, v2
      1ef6ce7a
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6 · 458f8c89
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
        mc13783-regulator: fix a memory leak in mc13783_regulator_remove
        regulator: Let drivers know when they use the stub API
      458f8c89
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/joern/logfs · 255f41c5
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/joern/logfs:
        [LogFS] Split large truncated into smaller chunks
        [LogFS] Set s_bdi
        [LogFS] Prevent mempool_destroy NULL pointer dereference
        [LogFS] Move assertion
        [LogFS] Plug 8 byte information leak
        [LogFS] Prevent memory corruption on large deletes
        [LogFS] Remove unused method
      
      Fix trivial conflict with added header includes in fs/logfs/super.c
      255f41c5
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6 · 9befb55e
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6:
        jfs: add jfs specific ->setattr call
        jfs: fix diAllocExt error in resizing filesystem
        jfs_dmap.[ch]: trivial typo fix: s/heigth/height/g
      9befb55e
    • Linus Torvalds's avatar
      Merge branch 'kvm-updates/2.6.34' of git://git.kernel.org/pub/scm/virt/kvm/kvm · a486b0af
      Linus Torvalds authored
      * 'kvm-updates/2.6.34' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86: Fix TSS size check for 16-bit tasks
        KVM: Add missing srcu_read_lock() for kvm_mmu_notifier_release()
        KVM: Increase NR_IOBUS_DEVS limit to 200
        KVM: fix the handling of dirty bitmaps to avoid overflows
        KVM: MMU: fix kvm_mmu_zap_page() and its calling path
        KVM: VMX: Save/restore rflags.vm correctly in real mode
        KVM: allow bit 10 to be cleared in MSR_IA32_MC4_CTL
        KVM: Don't spam kernel log when injecting exceptions due to bad cr writes
        KVM: SVM: Fix memory leaks that happen when svm_create_vcpu() fails
        KVM: take srcu lock before call to complete_pio()
      a486b0af
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://neil.brown.name/md · 1519ae4d
      Linus Torvalds authored
      * 'for-linus' of git://neil.brown.name/md:
        md/raid5: allow for more than 2^31 chunks.
      1519ae4d
    • David Howells's avatar
      AFS: Don't pass error value to page_cache_release() in error handling · 083fd8b2
      David Howells authored
      In the error handling in afs_mntpt_do_automount(), we pass an error
      pointer to page_cache_release() if read_mapping_page() failed.  Instead,
      we should extend the gotos around the error handling we don't need.
      Reported-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      083fd8b2
    • Jan Kiszka's avatar
      KVM: x86: Fix TSS size check for 16-bit tasks · e8861cfe
      Jan Kiszka authored
      A 16-bit TSS is only 44 bytes long. So make sure to test for the correct
      size on task switch.
      Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
      e8861cfe
    • Lai Jiangshan's avatar
      KVM: Add missing srcu_read_lock() for kvm_mmu_notifier_release() · eda2beda
      Lai Jiangshan authored
      I got this dmesg due to srcu_read_lock() is missing in
      kvm_mmu_notifier_release().
      
      ===================================================
      [ INFO: suspicious rcu_dereference_check() usage. ]
      ---------------------------------------------------
      arch/x86/kvm/x86.h:72 invoked rcu_dereference_check() without protection!
      
      other info that might help us debug this:
      
      rcu_scheduler_active = 1, debug_locks = 0
      2 locks held by qemu-system-x86/3100:
       #0:  (rcu_read_lock){.+.+..}, at: [<ffffffff810d73dc>] __mmu_notifier_release+0x38/0xdf
       #1:  (&(&kvm->mmu_lock)->rlock){+.+...}, at: [<ffffffffa0130a6a>] kvm_mmu_zap_all+0x21/0x5e [kvm]
      
      stack backtrace:
      Pid: 3100, comm: qemu-system-x86 Not tainted 2.6.34-rc3-22949-gbc8a97a-dirty #2
      Call Trace:
       [<ffffffff8106afd9>] lockdep_rcu_dereference+0xaa/0xb3
       [<ffffffffa0123a89>] unalias_gfn+0x56/0xab [kvm]
       [<ffffffffa0119600>] gfn_to_memslot+0x16/0x25 [kvm]
       [<ffffffffa012ffca>] gfn_to_rmap+0x17/0x6e [kvm]
       [<ffffffffa01300c1>] rmap_remove+0xa0/0x19d [kvm]
       [<ffffffffa0130649>] kvm_mmu_zap_page+0x109/0x34d [kvm]
       [<ffffffffa0130a7e>] kvm_mmu_zap_all+0x35/0x5e [kvm]
       [<ffffffffa0122870>] kvm_arch_flush_shadow+0x16/0x22 [kvm]
       [<ffffffffa01189e0>] kvm_mmu_notifier_release+0x15/0x17 [kvm]
       [<ffffffff810d742c>] __mmu_notifier_release+0x88/0xdf
       [<ffffffff810d73dc>] ? __mmu_notifier_release+0x38/0xdf
       [<ffffffff81040848>] ? exit_mm+0xe0/0x115
       [<ffffffff810c2cb0>] exit_mmap+0x2c/0x17e
       [<ffffffff8103c472>] mmput+0x2d/0xd4
       [<ffffffff81040870>] exit_mm+0x108/0x115
      [...]
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
      eda2beda