Skip to content
  1. Oct 04, 2012
    • Arnd Bergmann's avatar
      ARM: at91: unused variable in at91_pm_verify_clocks · 9e0e4e11
      Arnd Bergmann authored
      
      
      The code using the variable 'i' in this function is conditional which
      results in a harmless compiler warning. Using the IS_ENABLED macro
      instead of #ifdef makes the code look nicer and gets rid of the
      warning.
      
      Without this patch, building at91sam9263_defconfig results in:
      
      /home/arnd/linux-arm/arch/arm/mach-at91/pm.c: In function 'at91_pm_verify_clocks':
      /home/arnd/linux-arm/arch/arm/mach-at91/pm.c:137:6: warning: unused variable 'i' [-Wunused-variable]
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
      Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
      9e0e4e11
    • Arnd Bergmann's avatar
      ARM: at91: skip at91_io_desc definition for NOMMU · ac09281a
      Arnd Bergmann authored
      
      
      On NOMMU systems, we do cannot remap the MMIO space, so the
      definition of at91_io_desc is unused.
      
      Without this patch, building at91x40_defconfig results in:
      
      arch/arm/mach-at91/setup.c:90:24: warning: 'at91_io_desc' defined but not used [-Wunused-variable]
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      ac09281a
    • Arnd Bergmann's avatar
      ARM: pxa: work around duplicate definition of GPIO24_SSP1_SFRM · e0347c52
      Arnd Bergmann authored
      
      
      The symbol "GPIO24_SSP1_SFRM" is defined in both mfp-pxa27x.h and
      mfp-pxa25x.h. Since the macro is not actually used in the cm-x2xx.c
      file, but it includes both headers, a safe workaround should be
      to just undefine it from the .c file. This is a bit hacky and
      the headers should be fixed to not both define it, but for now
      it gets us around an annoying warning.
      
      Without this patch, building cm_x2xx_defconfig results in:
      
      In file included from arch/arm/mach-pxa/include/mach-pxa/pxa27x.h:7:0,
                       from arch/arm/mach-pxa/cm-x2xx.c:25:
      arch/arm/mach-pxa/include/mach-pxa/mfp-pxa27x.h:215:0: warning: "GPIO24_SSP1_SFRM" redefined [enabled by default]
      arch/arm/mach-pxa/include/mach-pxa/mfp-pxa25x.h:111:0: note: this is the location of the previous definition
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarIgor Grinberg <grinberg@compulab.co.il>
      Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
      Cc: Mike Rapoport <mike@compulab.co.il>
      e0347c52
    • Arnd Bergmann's avatar
      ARM: pxa: remove sharpsl_fatal_check function · 066258f4
      Arnd Bergmann authored
      
      
      The sharpsl_fatal_check has not been used since Pavel Machek removed
      the caller in 99f329a2 "pxa/sharpsl_pm: zaurus c3000 aka spitz: fix
      resume". Nobody has complained since 2009, so it's safe to assume we
      can just remove the function.
      
      Without this patch, building corgi_defconfig results in:
      
      /home/arnd/linux-arm/arch/arm/mach-pxa/sharpsl_pm.c:693:12: warning: 'sharpsl_fatal_check' defined but not used [-Wunused-function]
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Stanislav Brabec <utx@penguin.cz>
      Cc: Eric Miao <eric.y.miao@gmail.com>
      Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
      066258f4
    • Arnd Bergmann's avatar
      ARM: pxa: define palmte2_pxa_keys conditionally · 30bda0eb
      Arnd Bergmann authored
      
      
      Gcc prints a harmless warning about palmte2_pxa_keys not being used
      when the gpio keyboard driver is disabled. The solution is to use
      the same #ifdef that is already present in the place where the
      symbol is used.
      
      Without this patch, building palmz72_defconfig results in:
      
      /home/arnd/linux-arm/arch/arm/mach-pxa/palmte2.c:128:31: warning: 'palmte2_pxa_keys' defined but not used [-Wunused-variable]
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarMarek Vasut <marek.vasut@gmail.com>
      Cc: Carlos Eduardo Medaglia Dyonisio <cadu@nerdfeliz.com>
      Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
      Cc: Eric Miao <eric.y.miao@gmail.com>
      30bda0eb
    • Arnd Bergmann's avatar
      ARM: pxa: Wunused-result warning in viper board file · 5f0cc6d1
      Arnd Bergmann authored
      
      
      Calling kstrtoul requires checking the result. In case of
      the viper_tpm_setup function, let's fail the __setup function
      if the number was invalid.
      
      Without this patch, building viper_defconfig results in:
      
      arch/arm/mach-pxa/viper.c: In function 'viper_tpm_setup':
      arch/arm/mach-pxa/viper.c:771:10: warning: ignoring return value of 'kstrtoul', declared with attribute warn_unused_result [-Wunused-result]
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarMarc Zyngier <maz@misterjones.org>
      Cc: Haojian Zhuang <haojian.zhuang@marvell.com>
      Cc: Eric Miao <eric.y.miao@gmail.com>
      5f0cc6d1
    • Arnd Bergmann's avatar
      ARM: shark: fix shark_pci_init return code · 9c7f4f5c
      Arnd Bergmann authored
      
      
      When run on the wrong platform, the shark_pci_init function
      returns an undefined value, as reported by a gcc warning,
      so let's just return -ENODEV.
      
      Without this patch, building shark_defconfig results in:
      
      arch/arm/mach-shark/pci.c: In function 'shark_pci_init':
      arch/arm/mach-shark/pci.c:42:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: "Krzysztof Halasa" <khc@pm.waw.pl>
      9c7f4f5c
  2. Oct 01, 2012
  3. Sep 30, 2012
    • Miklos Szeredi's avatar
      vfs: dcache: fix deadlock in tree traversal · 8110e16d
      Miklos Szeredi authored
      
      
      IBM reported a deadlock in select_parent().  This was found to be caused
      by taking rename_lock when already locked when restarting the tree
      traversal.
      
      There are two cases when the traversal needs to be restarted:
      
       1) concurrent d_move(); this can only happen when not already locked,
          since taking rename_lock protects against concurrent d_move().
      
       2) racing with final d_put() on child just at the moment of ascending
          to parent; rename_lock doesn't protect against this rare race, so it
          can happen when already locked.
      
      Because of case 2, we need to be able to handle restarting the traversal
      when rename_lock is already held.  This patch fixes all three callers of
      try_to_ascend().
      
      IBM reported that the deadlock is gone with this patch.
      
      [ I rewrote the patch to be smaller and just do the "goto again" if the
        lock was already held, but credit goes to Miklos for the real work.
         - Linus ]
      
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8110e16d
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v3.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 6a3e3dbe
      Linus Torvalds authored
      Pull IOMMU fixes from Joerg Roedel:
       "Two small patches:
      
      	* One patch to fix the function declarations for
      	  !CONFIG_IOMMU_API. This is causing build errors
      	  in linux-next and should be fixed for v3.6.
      
      	* Another patch to fix an IOMMU group related NULL pointer
      	  dereference."
      
      * tag 'iommu-fixes-v3.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/amd: Fix wrong assumption in iommu-group specific code
        iommu: static inline iommu group stub functions
      6a3e3dbe
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/users/willy/linux-nvme · 21e98932
      Linus Torvalds authored
      Pull NVMe driver fixes from Matthew Wilcox:
       "Now that actual hardware has been released (don't have any yet
        myself), people are starting to want some of these fixes merged."
      
      Willy doesn't have hardware? Guys...
      
      * git://git.infradead.org/users/willy/linux-nvme:
        NVMe: Cancel outstanding IOs on queue deletion
        NVMe: Free admin queue memory on initialisation failure
        NVMe: Use ida for nvme device instance
        NVMe: Fix whitespace damage in nvme_init
        NVMe: handle allocation failure in nvme_map_user_pages()
        NVMe: Fix uninitialized iod compiler warning
        NVMe: Do not set IO queue depth beyond device max
        NVMe: Set block queue max sectors
        NVMe: use namespace id for nvme_get_features
        NVMe: replace nvme_ns with nvme_dev for user admin
        NVMe: Fix nvme module init when nvme_major is set
        NVMe: Set request queue logical block size
      21e98932
  4. Sep 29, 2012
    • Linus Torvalds's avatar
      mtdchar: fix offset overflow detection · 9c603e53
      Linus Torvalds authored
      
      
      Sasha Levin has been running trinity in a KVM tools guest, and was able
      to trigger the BUG_ON() at arch/x86/mm/pat.c:279 (verifying the range of
      the memory type).  The call trace showed that it was mtdchar_mmap() that
      created an invalid remap_pfn_range().
      
      The problem is that mtdchar_mmap() does various really odd and subtle
      things with the vma page offset etc, and uses the wrong types (and the
      wrong overflow) detection for it.
      
      For example, the page offset may well be 32-bit on a 32-bit
      architecture, but after shifting it up by PAGE_SHIFT, we need to use a
      potentially 64-bit resource_size_t to correctly hold the full value.
      
      Also, we need to check that the vma length plus offset doesn't overflow
      before we check that it is smaller than the length of the mtdmap region.
      
      This fixes things up and tries to make the code a bit easier to read.
      
      Reported-and-tested-by: default avatarSasha Levin <levinsasha928@gmail.com>
      Acked-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
      Acked-by: default avatarArtem Bityutskiy <dedekind1@gmail.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: linux-mtd@lists.infradead.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9c603e53
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 6672d90f
      Linus Torvalds authored
      Pull networking fixes from David S Miller:
      
       1) Netfilter xt_limit module can use uninitialized rules, from Jan
          Engelhardt.
      
       2) Wei Yongjun has found several more spots where error pointers were
          treated as NULL/non-NULL and vice versa.
      
       3) bnx2x was converted to pci_io{,un}map() but one remaining plain
          iounmap() got missed.  From Neil Horman.
      
       4) Due to a fence-post type error in initialization of inetpeer entries
          (which is where we store the ICMP rate limiting information), we can
          erroneously drop ICMPs if the inetpeer was created right around when
          jiffies wraps.
      
          Fix from Nicolas Dichtel.
      
       5) smsc75xx resume fix from Steve Glendinnig.
      
       6) LAN87xx smsc chips need an explicit hardware init, from Marek Vasut.
      
       7) qlcnic uses msleep() with locks held, fix from Narendra K.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        netdev: octeon: fix return value check in octeon_mgmt_init_phy()
        inetpeer: fix token initialization
        qlcnic: Fix scheduling while atomic bug
        bnx2: Clean up remaining iounmap
        net: phy: smsc: Implement PHY config_init for LAN87xx
        smsc75xx: fix resume after device reset
        netdev: pasemi: fix return value check in pasemi_mac_phy_init()
        team: fix return value check
        l2tp: fix return value check
        netfilter: xt_limit: have r->cost != 0 case work
      6672d90f
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 7596824e
      Linus Torvalds authored
      Pull vfs fixes from Al Viro:
       "A couple of fixes; one for automount/lazy umount race, another a
        classic "we don't protect the refcount transition to zero with the
        lock that protects looking for object in hash" kind of crap in lockd."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        close the race in nlmsvc_free_block()
        do_add_mount()/umount -l races
      7596824e
    • Linus Torvalds's avatar
      Merge branch 'for-linus-3.6-rc-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml · 97956605
      Linus Torvalds authored
      Pull UML fixes from Richard Weinberger.
      
      * 'for-linus-3.6-rc-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
        um: Preinclude include/linux/kern_levels.h
        um: Fix IPC on um
        um: kill thread->forking
        um: let signal_delivered() do SIGTRAP on singlestepping into handler
        um: don't leak floating point state and segment registers on execve()
        um: take cleaning singlestep to start_thread()
      97956605
    • Linus Torvalds's avatar
      Merge tag 'dm-3.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm · c3a086e6
      Linus Torvalds authored
      Pull dm fixes from Alasdair G Kergon:
       "A few fixes for problems discovered during the 3.6 cycle.
      
        Of particular note, are fixes to the thin target's discard support,
        which I hope is finally working correctly; and fixes for multipath
        ioctls and device limits when there are no paths."
      
      * tag 'dm-3.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm:
        dm verity: fix overflow check
        dm thin: fix discard support for data devices
        dm thin: tidy discard support
        dm: retain table limits when swapping to new table with no devices
        dm table: clear add_random unless all devices have it set
        dm: handle requests beyond end of device instead of using BUG_ON
        dm mpath: only retry ioctl when no paths if queue_if_no_path set
        dm thin: do not set discard_zeroes_data
      c3a086e6
  5. Sep 28, 2012