1. 07 Jul, 2009 2 commits
    • Jiaying Zhang's avatar
      quota: Fix possible deadlock during parallel quotaon and quotaoff · d01730d7
      Jiaying Zhang authored
      The following test script triggers a deadlock on ext2 filesystem:
      while true; do quotaon /dev/hda >&/dev/null; usleep $RANDOM; done &
      while true; do quotaoff /dev/hda >&/dev/null; usleep $RANDOM; done &
      
      I found there is a potential deadlock between quotaon and quotaoff (or
      quotasync). Basically, all of quotactl operations need to be protected by
      dqonoff_mutex. vfs_quota_off and vfs_quota_sync also call sb->s_op->quota_write
      that needs to grab the i_mutex of the quota file.  But in vfs_quota_on_inode
      (called from quotaon operation), the current code tries to grab  the i_mutex of
      the quota file first before getting quonoff_mutex.
      
      Reverse the order in which we take locks in vfs_quota_on_inode().
      
      Jan Kara: Changed changelog to be more readable, made lockdep happy with
        I_MUTEX_QUOTA.
      Signed-off-by: default avatarJiaying Zhang <jiayingz@google.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      d01730d7
    • Linus Torvalds's avatar
      Merge branch 'x86-fixes-for-linus' of... · faf80d62
      Linus Torvalds authored
      Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        x86: fix usage of bios intcall()
        x86: Remove unused function lapic_watchdog_ok()
        x86: Remove unused variable disable_x2apic
        x86, kvm: Fix section mismatches in kvm.c
        x86: Add missing annotation to arch/x86/lib/copy_user_64.S::copy_to_user
        x86: Fix fixmap page order for FIX_TEXT_POKE0,1
        amd-iommu: set evt_buf_size correctly
        amd-iommu: handle alias entries correctly in init code
        x86: Fix printk call in print_local_apic()
        x86: Declare check_efer() before it gets used
        x86: Mark device_nb as static and fix NULL noise
        x86: Remove double declaration of MSR_P6_EVNTSEL0 and MSR_P6_EVNTSEL1
        xen: Use kcalloc() in xen_init_IRQ()
        x86: Fix fixmap ordering
        x86: Fix symbol annotation for arch/x86/lib/clear_page_64.S::clear_page_c
      faf80d62
  2. 06 Jul, 2009 38 commits