1. 26 4月, 2012 10 次提交
    • A
      drivers/rtc/rtc-ds1307.c: fix BUG shown with lock debugging enabled · 3f5ec5e0
      Anatolij Gustschin 提交于
      Add struct bin_attribute initialization to fix the following bug:
      
      rtc-ds1307 3-0068: rtc core: registered ds1307 as rtc0
      BUG: key cfb14fcc not in .data!
      ------------[ cut here ]------------
      WARNING: at kernel/lockdep.c:2986 sysfs_add_file_mode+0x84/0xdc()
      Modules linked in:
      [<c0018d94>] (unwind_backtrace+0x0/0xf8) from [<c0031f7c>] (warn_slowpath_common+0x4c/0x64)
      [<c0031f7c>] (warn_slowpath_common+0x4c/0x64) from [<c0031fb0>] (warn_slowpath_null+0x1c/0x24)
      [<c0031fb0>] (warn_slowpath_null+0x1c/0x24) from [<c012f7ac>] (sysfs_add_file_mode+0x84/0xdc)
      [<c012f7ac>] (sysfs_add_file_mode+0x84/0xdc) from [<c04b11e4>] (ds1307_probe+0x5e4/0x6ac)
      [<c04b11e4>] (ds1307_probe+0x5e4/0x6ac) from [<c036e600>] (i2c_device_probe+0xdc/0x108)
      [<c036e600>] (i2c_device_probe+0xdc/0x108) from [<c02cdf84>] (driver_probe_device+0x90/0x210)
      [<c02cdf84>] (driver_probe_device+0x90/0x210) from [<c02ce198>] (__driver_attach+0x94/0x98)
      [<c02ce198>] (__driver_attach+0x94/0x98) from [<c02cc824>] (bus_for_each_dev+0x50/0x7c)
      [<c02cc824>] (bus_for_each_dev+0x50/0x7c) from [<c02cd780>] (bus_add_driver+0x184/0x244)
      [<c02cd780>] (bus_add_driver+0x184/0x244) from [<c02ce43c>] (driver_register+0x78/0x12c)
      [<c02ce43c>] (driver_register+0x78/0x12c) from [<c03701ac>] (i2c_register_driver+0x2c/0xb4)
      [<c03701ac>] (i2c_register_driver+0x2c/0xb4) from [<c0008798>] (do_one_initcall+0x34/0x178)
      [<c0008798>] (do_one_initcall+0x34/0x178) from [<c0691860>] (kernel_init+0xdc/0x194)
      [<c0691860>] (kernel_init+0xdc/0x194) from [<c0013cf0>] (kernel_thread_exit+0x0/0x8)
      
      Since commit 6992f533 ("sysfs: Use one lockdep class per sysfs
      attribute") this initialization is required.
      Reported-by: NStefano Babic <sbabic@denx.de>
      Tested-by: NStefano Babic <sbabic@denx.de>
      Signed-off-by: NAnatolij Gustschin <agust@denx.de>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Acked-by: NWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3f5ec5e0
    • V
      arch/arm/mach-ux500/mbox-db5500.c: world-writable sysfs fifo file · db7b122c
      Vasiliy Kulikov 提交于
      Don't allow everybody to use a modem.
      Signed-off-by: NVasiliy Kulikov <segoon@openwall.com>
      Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      db7b122c
    • A
      hugetlbfs: lockdep annotate root inode properly · 65ed7601
      Aneesh Kumar K.V 提交于
      This fixes the below reported false lockdep warning.  e096d0c7
      ("lockdep: Add helper function for dir vs file i_mutex annotation") added
      a similar annotation for every other inode in hugetlbfs but missed the
      root inode because it was allocated by a separate function.
      
      For HugeTLB fs we allow taking i_mutex in mmap.  HugeTLB fs doesn't
      support file write and its file read callback is modified in a05b0855
      ("hugetlbfs: avoid taking i_mutex from hugetlbfs_read()") to not take
      i_mutex.  Hence for HugeTLB fs with regular files we really don't take
      i_mutex with mmap_sem held.
      
       ======================================================
       [ INFO: possible circular locking dependency detected ]
       3.4.0-rc1+ #322 Not tainted
       -------------------------------------------------------
       bash/1572 is trying to acquire lock:
        (&mm->mmap_sem){++++++}, at: [<ffffffff810f1618>] might_fault+0x40/0x90
      
       but task is already holding lock:
        (&sb->s_type->i_mutex_key#12){+.+.+.}, at: [<ffffffff81125f88>] vfs_readdir+0x56/0xa8
      
       which lock already depends on the new lock.
      
       the existing dependency chain (in reverse order) is:
      
       -> #1 (&sb->s_type->i_mutex_key#12){+.+.+.}:
              [<ffffffff810a09e5>] lock_acquire+0xd5/0xfa
              [<ffffffff816a2f5e>] __mutex_lock_common+0x48/0x350
              [<ffffffff816a3325>] mutex_lock_nested+0x2a/0x31
              [<ffffffff811fb8e1>] hugetlbfs_file_mmap+0x7d/0x104
              [<ffffffff810f859a>] mmap_region+0x272/0x47d
              [<ffffffff810f8a39>] do_mmap_pgoff+0x294/0x2ee
              [<ffffffff810f8b65>] sys_mmap_pgoff+0xd2/0x10e
              [<ffffffff8103d19e>] sys_mmap+0x1d/0x1f
              [<ffffffff816a5922>] system_call_fastpath+0x16/0x1b
      
       -> #0 (&mm->mmap_sem){++++++}:
              [<ffffffff810a0256>] __lock_acquire+0xa81/0xd75
              [<ffffffff810a09e5>] lock_acquire+0xd5/0xfa
              [<ffffffff810f1645>] might_fault+0x6d/0x90
              [<ffffffff81125d62>] filldir+0x6a/0xc2
              [<ffffffff81133a83>] dcache_readdir+0x5c/0x222
              [<ffffffff81125fa8>] vfs_readdir+0x76/0xa8
              [<ffffffff811260b6>] sys_getdents+0x79/0xc9
              [<ffffffff816a5922>] system_call_fastpath+0x16/0x1b
      
       other info that might help us debug this:
      
        Possible unsafe locking scenario:
      
              CPU0                    CPU1
              ----                    ----
         lock(&sb->s_type->i_mutex_key#12);
                                      lock(&mm->mmap_sem);
                                      lock(&sb->s_type->i_mutex_key#12);
         lock(&mm->mmap_sem);
      
        *** DEADLOCK ***
      
       1 lock held by bash/1572:
        #0:  (&sb->s_type->i_mutex_key#12){+.+.+.}, at: [<ffffffff81125f88>] vfs_readdir+0x56/0xa8
      
       stack backtrace:
       Pid: 1572, comm: bash Not tainted 3.4.0-rc1+ #322
       Call Trace:
        [<ffffffff81699a3c>] print_circular_bug+0x1f8/0x209
        [<ffffffff810a0256>] __lock_acquire+0xa81/0xd75
        [<ffffffff810f38aa>] ? handle_pte_fault+0x5ff/0x614
        [<ffffffff8109e622>] ? mark_lock+0x2d/0x258
        [<ffffffff810f1618>] ? might_fault+0x40/0x90
        [<ffffffff810a09e5>] lock_acquire+0xd5/0xfa
        [<ffffffff810f1618>] ? might_fault+0x40/0x90
        [<ffffffff816a3249>] ? __mutex_lock_common+0x333/0x350
        [<ffffffff810f1645>] might_fault+0x6d/0x90
        [<ffffffff810f1618>] ? might_fault+0x40/0x90
        [<ffffffff81125d62>] filldir+0x6a/0xc2
        [<ffffffff81133a83>] dcache_readdir+0x5c/0x222
        [<ffffffff81125cf8>] ? sys_ioctl+0x74/0x74
        [<ffffffff81125cf8>] ? sys_ioctl+0x74/0x74
        [<ffffffff81125cf8>] ? sys_ioctl+0x74/0x74
        [<ffffffff81125fa8>] vfs_readdir+0x76/0xa8
        [<ffffffff811260b6>] sys_getdents+0x79/0xc9
        [<ffffffff816a5922>] system_call_fastpath+0x16/0x1b
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Dave Jones <davej@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Josh Boyer <jwboyer@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      65ed7601
    • P
      acerhdf: lowered default temp fanon/fanoff values · 351963bb
      Peter Feuerer 提交于
      Due to new supported hardware, of which the actual temperature limits of
      processor, harddisk and other components are unknown, it feels safer with
      lower fanon / fanoff settings.
      
      It won't change much for most people, already using acerhdf, as they use
      their own fanon/fanoff variable settings when loading the module.
      
      Furthermore seems like kernel and userspace tools have been improved to
      work more efficient and netbooks don't get so hot anymore.
      Signed-off-by: NPeter Feuerer <peter@piie.net>
      Acked-by: NBorislav Petkov <petkovbb@gmail.com>
      Cc: Matthew Garrett <mjg@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      351963bb
    • P
      acerhdf: add support for new hardware · 43ae1e32
      Peter Feuerer 提交于
      Add support for new hardware:
      Acer Aspire LT-10Q/531/751/1810/1825,
      Acer Travelmate 7730,
      Packard Bell ENBFT/DOTVR46
      Signed-off-by: NPeter Feuerer <peter@piie.net>
      Acked-by: NBorislav Petkov <petkovbb@gmail.com>
      Cc: Matthew Garrett <mjg@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      43ae1e32
    • C
      acerhdf: add support for Aspire 1410 BIOS v1.3314 · e39a9ba2
      Clay Carpenter 提交于
      Add support for Aspire 1410 BIOS v1.3314.  Fixes the following error:
      
      acerhdf: unknown (unsupported) BIOS version Acer/Aspire 1410/v1.3314,
      please report, aborting!
      Signed-off-by: NClay Carpenter <claycarpenter@gmail.com>
      Signed-off-by: NPeter Feuerer <peter@piie.net>
      Cc: Matthew Garrett <mjg@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e39a9ba2
    • G
      fs/buffer.c: remove BUG() in possible but rare condition · 61065a30
      Glauber Costa 提交于
      While stressing the kernel with with failing allocations today, I hit the
      following chain of events:
      
      alloc_page_buffers():
      
      	bh = alloc_buffer_head(GFP_NOFS);
      	if (!bh)
      		goto no_grow; <= path taken
      
      grow_dev_page():
              bh = alloc_page_buffers(page, size, 0);
              if (!bh)
                      goto failed;  <= taken, consequence of the above
      
      and then the failed path BUG()s the kernel.
      
      The failure is inserted a litte bit artificially, but even then, I see no
      reason why it should be deemed impossible in a real box.
      
      Even though this is not a condition that we expect to see around every
      time, failed allocations are expected to be handled, and BUG() sounds just
      too much.  As a matter of fact, grow_dev_page() can return NULL just fine
      in other circumstances, so I propose we just remove it, then.
      Signed-off-by: NGlauber Costa <glommer@parallels.com>
      Cc: Michal Hocko <mhocko@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      61065a30
    • Y
      mm: fix up the vmscan stat in vmstat · 904249aa
      Ying Han 提交于
      The "pgsteal" stat is confusing because it counts both direct reclaim as
      well as background reclaim.  However, we have "kswapd_steal" which also
      counts background reclaim value.
      
      This patch fixes it and also makes it match the existng "pgscan_" stats.
      
      Test:
      pgsteal_kswapd_dma32 447623
      pgsteal_kswapd_normal 42272677
      pgsteal_kswapd_movable 0
      pgsteal_direct_dma32 2801
      pgsteal_direct_normal 44353270
      pgsteal_direct_movable 0
      Signed-off-by: NYing Han <yinghan@google.com>
      Reviewed-by: NRik van Riel <riel@redhat.com>
      Acked-by: NChristoph Lameter <cl@linux.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Michal Hocko <mhocko@suse.cz>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Acked-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Hillf Danton <dhillf@gmail.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Dan Magenheimer <dan.magenheimer@oracle.com>
      Reviewed-by: NMinchan Kim <minchan@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      904249aa
    • J
      epoll: clear the tfile_check_list on -ELOOP · 13d51807
      Jason Baron 提交于
      An epoll_ctl(,EPOLL_CTL_ADD,,) operation can return '-ELOOP' to prevent
      circular epoll dependencies from being created.  However, in that case we
      do not properly clear the 'tfile_check_list'.  Thus, add a call to
      clear_tfile_check_list() for the -ELOOP case.
      Signed-off-by: NJason Baron <jbaron@redhat.com>
      Reported-by: NYurij M. Plotnikov <Yurij.Plotnikov@oktetlabs.ru>
      Cc: Nelson Elhage <nelhage@nelhage.com>
      Cc: Davide Libenzi <davidel@xmailserver.org>
      Tested-by: NAlexandra N. Kossovsky <Alexandra.Kossovsky@oktetlabs.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      13d51807
    • K
      mm/hugetlb: fix warning in alloc_huge_page/dequeue_huge_page_vma · b1c12cbc
      Konstantin Khlebnikov 提交于
      Fix a gcc warning (and bug?) introduced in cc9a6c87 ("cpuset: mm: reduce
      large amounts of memory barrier related damage v3")
      
      Local variable "page" can be uninitialized if the nodemask from vma policy
      does not intersects with nodemask from cpuset.  Even if it doesn't happens
      it is better to initialize this variable explicitly than to introduce
      a kernel oops in a weird corner case.
      
      mm/hugetlb.c: In function `alloc_huge_page':
      mm/hugetlb.c:1135:5: warning: `page' may be used uninitialized in this function
      Signed-off-by: NKonstantin Khlebnikov <khlebnikov@openvz.org>
      Acked-by: NMel Gorman <mgorman@suse.de>
      Acked-by: NDavid Rientjes <rientjes@google.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b1c12cbc
  2. 22 4月, 2012 6 次提交
    • L
      Linux 3.4-rc4 · 66f75a5d
      Linus Torvalds 提交于
      66f75a5d
    • Y
      sparc32,leon: add notify_cpu_starting() · e9a5ea18
      Yong Zhang 提交于
      Otherwise cpu_active_mask will not set, which lead to other issue.
      Signed-off-by: NYong Zhang <yong.zhang0@gmail.com>
      Signed-off-by: NKonrad Eisele <konrad@gaisler.com>
      Reviewed-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e9a5ea18
    • L
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 8f4f9d4d
      Linus Torvalds 提交于
      Pull "ARM: SoC fixes" from Olof Johansson:
       * at91, ux500, imx, omap and bcmring:
        - at91 fixes for =m driver build issues, irqdomain fixes and config
          dependency fixes
        - ux500 kconfig dependency fixes and a  smp wakeup bugfix
        - imx idle bugfix and build fix due to irq domain changes
        - omap uart pinmux fixes, softreset regression revert and misc fixes
        - bcmring build error regression fix
      
       * ux500 and imx had some small defconfig updates in this branch
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (27 commits)
        ARM: bcmring: fix UART declarations
        ARM: imx: Fix imx5 idle logic bug
        ARM: imx27-dt: Fix build due to removal of irq_domain_add_simple()
        ARM: imx_v4_v5_defconfig: Add support for CONFIG_REGULATOR_FIXED_VOLTAGE
        ARM: OMAP1: DMTIMER: fix broken timer clock source selection
        ARM: OMAP: serial: Fix the ocp smart idlemode handling bug
        ARM: OMAP2+: UART: Fix incorrect population of default uart pads
        ARM: OMAP: sram: fix BUG in dpll code for !PM case
        dmaengine: Kconfig: fix Atmel at_hdmac entry
        USB: gadget/at91_udc: add gpio_to_irq() function to vbus interrupt
        USB: ohci-at91: change annotations for probe/remove functions
        leds-atmel-pwm.c: Make pwmled_probe() __devinit
        ARM: at91: fix at91sam9261ek Ethernet dm9000 irq
        ARM: at91: fix rm9200ek flash size
        ARM: at91: remove empty at91_init_serial function
        ARM: at91: fix typo in at91_pmc_base assembly declaration
        ARM: at91: Export at91_matrix_base
        ARM: at91: Export at91_pmc_base
        ARM: at91: Export at91_ramc_base
        ARM: at91: Export at91_st_base
        ...
      8f4f9d4d
    • L
      Merge tag 'mmc-fixes-for-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc · 126a3483
      Linus Torvalds 提交于
      Pull MMC fixes from Chris Ball:
       - Build fix for omap_hsmmc with OF against 3.4-rc1.
       - Fix CONFIG_MMC_UNSAFE_RESUME semantics regression against 3.3, which
         broke hotplug card detection when UNSAFE_RESUME is set.
       - Fix a race condition in omap_hsmmc with runtime PM.
       - Fix two libertas SDIO-powered-resume regressions.
       - Small fixes for discard/sanitize, dw_mmc, cd-gpio and esdhc-imx.
      
      * tag 'mmc-fixes-for-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
        mmc: core: Do not pre-claim host in suspend
        mmc: dw_mmc: prevent NULL dereference for dma_ops
        mmc: unbreak sdhci-esdhc-imx on i.MX25
        mmc: cd-gpio: Include header to pickup exported symbol prototypes
        mmc: sdhci: refine non-removable card checking for card detection
        mmc: dw_mmc: Fix switch from DMA to PIO
        mmc: remove MMC bus legacy suspend/resume method
        mmc: omap_hsmmc: Get rid of of_have_populated_dt() usage
        mmc: omap_hsmmc: build fix for CONFIG_OF=y and CONFIG_MMC_OMAP_HS=m
        mmc: fixes for eMMC v4.5 sanitize operation
        mmc: fixes for eMMC v4.5 discard operation
      126a3483
    • L
      Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 88981596
      Linus Torvalds 提交于
      Pull media fixes from Mauro Carvalho Chehab:
       - Fixes a regression at DVB core when switching from DVB-S2 to DVB-S on
         Kaffeine (Fedora 16 Bugzilla #812895);
       - Fixes a mutex unlock at an error condition at drx-k;
       - Fix winbond-cir set mode;
       - mt9m032: Fix a compilation breakage with some random Kconfig;
       - mt9m032: fix two dead locks;
       - xc5000: don't require an special firmware (that won't be provided by
         the vendor) just because the xtal frequency is different;
       - V4L DocBook: fix some typos at multi-plane formats description.
      
      * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
        [media] xc5000: support 32MHz & 31.875MHz xtal using the 41.024.5 firmware
        [media] V4L: mt9m032: fix compilation breakage
        [media] V4L: DocBook: Fix typos in the multi-plane formats description
        [media] V4L: mt9m032: fix two dead-locks
        [media] rc-core: set mode for winbond-cir
        [media] drxk: Does not unlock mutex if sanity check failed in scu_command()
        [media] dvb_frontend: Fix a regression when switching back to DVB-S
      88981596
    • L
      Merge tag 'mfd-for-linus-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 · 9f24ff6f
      Linus Torvalds 提交于
      Pull MFD fixes from Samuel Ortiz:
       "We have 3 build fixes, a OMAP USB host PHY reset fix and the twl6040
        conversion to an i2c driver.  The latter may not sound like a fix but
        the twl6040 MFD driver won't probe without it, triggering an OMAP4
        audio regression."
      
      * tag 'mfd-for-linus-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
        mfd: Fix modular builds of rc5t583 regulator support
        mfd: Fix asic3_gpio_to_irq
        ARM: OMAP3: USB: Fix the EHCI ULPI PHY reset issue
        mfd: Convert twl6040 to i2c driver, and separate it from twl core
        mfd : Fix dbx500 compilation error
      9f24ff6f
  3. 21 4月, 2012 24 次提交