Skip to content
  1. Oct 07, 2010
    • NeilBrown's avatar
      md/raid1: minor bio initialisation improvements. · db8d9d35
      NeilBrown authored
      
      
      
      When performing a resync we pre-allocate some bios and repeatedly use
      them.  This requires us to re-initialise them each time.
      One field (bi_comp_cpu) and some flags weren't being initiaised
      reliably.
      
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      db8d9d35
    • NeilBrown's avatar
      md/raid1: avoid overflow in raid1 resync when bitmap is in use. · 7571ae88
      NeilBrown authored
      bitmap_start_sync returns - via a pass-by-reference variable - the
      number of sectors before we need to check with the bitmap again.
      Since commit ef425673
      
       this number can be substantially larger,
      2^27 is a common value.
      
      Unfortunately it is an 'int' and so when raid1.c:sync_request shifts
      it 9 places to the left it becomes 0.  This results in a zero-length
      read which the scsi layer justifiably complains about.
      
      This patch just removes the shift so the common case becomes safe with
      a trivially-correct patch.
      
      In the next merge window we will convert this 'int' to a 'sector_t'
      
      Reported-by: default avatar"George Spelvin" <linux@horizon.com>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      7571ae88
  2. Oct 06, 2010
  3. Oct 05, 2010
  4. Oct 04, 2010
  5. Oct 03, 2010
  6. Oct 02, 2010
    • Julia Lawall's avatar
      drivers/gpu/drm/i915/i915_gem.c: Add missing error handling code · 929f49bf
      Julia Lawall authored
      Extend the error handling code with operations found in other nearby error
      handling code
      
      A simplified version of the sematic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/
      
      )
      
      // <smpl>
      @r exists@
      @r@
      statement S1,S2,S3;
      constant C1,C2,C3;
      @@
      
      *if (...)
       {... S1 return -C1;}
      ...
      *if (...)
       {... when != S1
          return -C2;}
      ...
      *if (...)
       {... S1 return -C3;}
      // </smpl>
      
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: stable@kernel.org
      929f49bf
    • Axel Lin's avatar
      regulator: max8649 - fix setting extclk_freq · 0f69c897
      Axel Lin authored
      
      
      The SYNC bits are BIT6 and BIT7 of MAX8649_SYNC register.
      pdata->extclk_freq could be [0|1|2].
      (MAX8649_EXTCLK_26MHZ|MAX8649_EXTCLK_13MHZ|MAX8649_EXTCLK_19MHZ)
      It requires to left shift 6 bits to properly set extclk_freq.
      
      Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
      Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
      0f69c897
    • Cyril Chemparathy's avatar
      regulator: fix typo in current units · e4a6376b
      Cyril Chemparathy authored
      
      
      This patch fixes a typo that incorrectly reports mA numbers as uA.
      
      Signed-off-by: default avatarCyril Chemparathy <cyril@ti.com>
      Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
      e4a6376b
    • Vasiliy Kulikov's avatar
      regulator: fix device_register() error handling · ad7725cb
      Vasiliy Kulikov authored
      
      
      If device_register() fails then call put_device().
      See comment to device_register.
      
      Signed-off-by: default avatarVasiliy Kulikov <segooon@gmail.com>
      Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
      ad7725cb
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 · c6ea21e3
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
        cifs: prevent infinite recursion in cifs_reconnect_tcon
        cifs: set backing_dev_info on new S_ISREG inodes
      c6ea21e3
    • Linus Torvalds's avatar
      Merge branch 'x86-fixes-for-linus' of... · f4a3330d
      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, hpet: Fix bogus error check in hpet_assign_irq()
        x86, irq: Plug memory leak in sparse irq
        x86, cpu: After uncapping CPUID, re-run CPU feature detection
      f4a3330d
    • David Howells's avatar
      MN10300: Fix flush_icache_range() · 57cf4f78
      David Howells authored
      
      
      flush_icache_range() is given virtual addresses to describe the region.  It
      deals with these by attempting to translate them through the current set of
      page tables.
      
      This is fine for userspace memory and vmalloc()'d areas as they are governed by
      page tables.  However, since the regions above 0x80000000 aren't translated
      through the page tables by the MMU, the kernel doesn't bother to set up page
      tables for them (see paging_init()).
      
      This means flush_icache_range() as it stands cannot be used to flush regions of
      the VM area between 0x80000000 and 0x9fffffff where the kernel resides if the
      data cache is operating in WriteBack mode.
      
      To fix this, make flush_icache_range() first check for addresses in the upper
      half of VM space and deal with them appropriately, before dealing with any
      range in the page table mapped area.
      
      Ordinarily, this is not a problem, but it has the capacity to make kprobes and
      kgdb malfunction.  It should not affect gdbstub, signal frame setup or module
      loading as gdb has its own flush functions, and the others take place in the
      page table mapped area only.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Acked-by: default avatarAkira Takeuchi <takeuchi.akr@jp.panasonic.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      57cf4f78
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 · 18ffe4b1
      Linus Torvalds authored
      * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
        vmwgfx: Fix fb VRAM pinning failure due to fragmentation
        vmwgfx: Remove initialisation of dev::devname
        vmwgfx: Enable use of the vblank system
        vmwgfx: vt-switch (master drop) fixes
        drm/vmwgfx: Fix breakage introduced by commit "drm: block userspace under allocating buffer and having drivers overwrite it (v2)"
        drm: Hold the mutex when dropping the last GEM reference (v2)
        drm/gem: handlecount isn't really a kref so don't make it one.
        drm: i810/i830: fix locked ioctl variant
        drm/radeon/kms: add quirk for MSI K9A2GM motherboard
        drm/radeon/kms: fix potential segfault in r600_ioctl_wait_idle
        drm: Prune GEM vma entries
        drm/radeon/kms: fix up encoder info messages for DFP6
        drm/radeon: fix PCI ID 5657 to be an RV410
      18ffe4b1
    • Linus Torvalds's avatar
      Merge branch 'for-linus/i2c/2636-rc5' of git://git.fluff.org/bjdooks/linux · b10c4d40
      Linus Torvalds authored
      * 'for-linus/i2c/2636-rc5' of git://git.fluff.org/bjdooks/linux:
        i2c-s3c2410: fix calculation of SDA line delay
        i2c-davinci: Fix race when setting up for TX
        i2c-octeon: Return -ETIMEDOUT in octeon_i2c_wait() on timeout
      b10c4d40
    • Linus Torvalds's avatar
      Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 · 303a4070
      Linus Torvalds authored
      * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
        ACPI: invoke DSDT corruption workaround on all Toshiba Satellite
        ACPI, APEI, Fix ERST MOVE_DATA instruction implementation
        ACPI: fan: Fix more unbalanced code block
        ACPI: acpi_pad: simplify code to avoid false gcc build warning
        ACPI, APEI, Fix error path for memory allocation
        ACPI, APEI, HEST Fix the unsuitable usage of platform_data
        ACPI, APEI, Fix acpi_pre_map() return value
        ACPI, APEI, Fix APEI related table size checking
        ACPI: Disable Windows Vista compatibility for Toshiba P305D
        ACPI: Kconfig: fix typo.
        ACPI: add missing __percpu markup in arch/x86/kernel/acpi/cstate.c
        ACPI: Fix typos
        ACPI video: fix a poor warning message
        ACPI: fix build warnings resulting from merge window conflict
        ACPI: EC: add Vista incompatibility DMI entry for Toshiba Satellite L355
        ACPI: expand Vista blacklist to include SP1 and SP2
        ACPI: delete ZEPTO idle=nomwait DMI quirk
        ACPI: enable repeated PCIEXP wakeup by clearing PCIEXP_WAKE_STS on resume
        PM / ACPI: Blacklist systems known to require acpi_sleep=nonvs
        ACPI: Don't report current_now if battery reports in mWh
      303a4070
    • Linus Torvalds's avatar
      Merge branch 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6 · 35ec4216
      Linus Torvalds authored
      * 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6:
        intel_idle: Voluntary leave_mm before entering deeper
        acpi_idle: add missing \n to printk
        intel_idle: add missing __percpu markup
        intel_idle: Change mode 755 => 644
        cpuidle: Fix typos
        intel_idle: PCI quirk to prevent Lenovo Ideapad s10-3 boot hang
      35ec4216
    • Linus Torvalds's avatar
      Merge branch 'omap-fixes-for-linus' of... · 3c729087
      Linus Torvalds authored
      Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
      
      * 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
        omap: McBSP: tx_irq_completion used in rx_irq_handler
        omap: Fix compile dependency to LEDS_CLASS
      3c729087
    • Frederic Weisbecker's avatar
      reiserfs: fix unwanted reiserfs lock recursion · 9d8117e7
      Frederic Weisbecker authored
      
      
      Prevent from recursively locking the reiserfs lock in reiserfs_unpack()
      because we may call journal_begin() that requires the lock to be taken
      only once, otherwise it won't be able to release the lock while taking
      other mutexes, ending up in inverted dependencies between the journal
      mutex and the reiserfs lock for example.
      
      This fixes:
      
        =======================================================
        [ INFO: possible circular locking dependency detected ]
        2.6.35.4.4a #3
        -------------------------------------------------------
        lilo/1620 is trying to acquire lock:
         (&journal->j_mutex){+.+...}, at: [<d0325bff>] do_journal_begin_r+0x7f/0x340 [reiserfs]
      
        but task is already holding lock:
         (&REISERFS_SB(s)->lock){+.+.+.}, at: [<d032a278>] reiserfs_write_lock+0x28/0x40 [reiserfs]
      
        which lock already depends on the new lock.
      
        the existing dependency chain (in reverse order) is:
      
        -> #1 (&REISERFS_SB(s)->lock){+.+.+.}:
               [<c10562b7>] lock_acquire+0x67/0x80
               [<c12facad>] __mutex_lock_common+0x4d/0x410
               [<c12fb0c8>] mutex_lock_nested+0x18/0x20
               [<d032a278>] reiserfs_write_lock+0x28/0x40 [reiserfs]
               [<d0325c06>] do_journal_begin_r+0x86/0x340 [reiserfs]
               [<d0325f77>] journal_begin+0x77/0x140 [reiserfs]
               [<d0315be4>] reiserfs_remount+0x224/0x530 [reiserfs]
               [<c10b6a20>] do_remount_sb+0x60/0x110
               [<c10cee25>] do_mount+0x625/0x790
               [<c10cf014>] sys_mount+0x84/0xb0
               [<c12fca3d>] syscall_call+0x7/0xb
      
        -> #0 (&journal->j_mutex){+.+...}:
               [<c10560f6>] __lock_acquire+0x1026/0x1180
               [<c10562b7>] lock_acquire+0x67/0x80
               [<c12facad>] __mutex_lock_common+0x4d/0x410
               [<c12fb0c8>] mutex_lock_nested+0x18/0x20
               [<d0325bff>] do_journal_begin_r+0x7f/0x340 [reiserfs]
               [<d0325f77>] journal_begin+0x77/0x140 [reiserfs]
               [<d0326271>] reiserfs_persistent_transaction+0x41/0x90 [reiserfs]
               [<d030d06c>] reiserfs_get_block+0x22c/0x1530 [reiserfs]
               [<c10db9db>] __block_prepare_write+0x1bb/0x3a0
               [<c10dbbe6>] block_prepare_write+0x26/0x40
               [<d030b738>] reiserfs_prepare_write+0x88/0x170 [reiserfs]
               [<d03294d6>] reiserfs_unpack+0xe6/0x120 [reiserfs]
               [<d0329782>] reiserfs_ioctl+0x272/0x320 [reiserfs]
               [<c10c3188>] vfs_ioctl+0x28/0xa0
               [<c10c3bbd>] do_vfs_ioctl+0x32d/0x5c0
               [<c10c3eb3>] sys_ioctl+0x63/0x70
               [<c12fca3d>] syscall_call+0x7/0xb
      
        other info that might help us debug this:
      
        2 locks held by lilo/1620:
         #0:  (&sb->s_type->i_mutex_key#8){+.+.+.}, at: [<d032945a>] reiserfs_unpack+0x6a/0x120 [reiserfs]
         #1:  (&REISERFS_SB(s)->lock){+.+.+.}, at: [<d032a278>] reiserfs_write_lock+0x28/0x40 [reiserfs]
      
        stack backtrace:
        Pid: 1620, comm: lilo Not tainted 2.6.35.4.4a #3
        Call Trace:
         [<c10560f6>] __lock_acquire+0x1026/0x1180
         [<c10562b7>] lock_acquire+0x67/0x80
         [<c12facad>] __mutex_lock_common+0x4d/0x410
         [<c12fb0c8>] mutex_lock_nested+0x18/0x20
         [<d0325bff>] do_journal_begin_r+0x7f/0x340 [reiserfs]
         [<d0325f77>] journal_begin+0x77/0x140 [reiserfs]
         [<d0326271>] reiserfs_persistent_transaction+0x41/0x90 [reiserfs]
         [<d030d06c>] reiserfs_get_block+0x22c/0x1530 [reiserfs]
         [<c10db9db>] __block_prepare_write+0x1bb/0x3a0
         [<c10dbbe6>] block_prepare_write+0x26/0x40
         [<d030b738>] reiserfs_prepare_write+0x88/0x170 [reiserfs]
         [<d03294d6>] reiserfs_unpack+0xe6/0x120 [reiserfs]
         [<d0329782>] reiserfs_ioctl+0x272/0x320 [reiserfs]
         [<c10c3188>] vfs_ioctl+0x28/0xa0
         [<c10c3bbd>] do_vfs_ioctl+0x32d/0x5c0
         [<c10c3eb3>] sys_ioctl+0x63/0x70
         [<c12fca3d>] syscall_call+0x7/0xb
      
      Reported-by: default avatarJarek Poplawski <jarkao2@gmail.com>
      Tested-by: default avatarJarek Poplawski <jarkao2@gmail.com>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Jeff Mahoney <jeffm@suse.com>
      Cc: All since 2.6.32 <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9d8117e7