1. 16 10月, 2013 6 次提交
    • J
      apparmor: fix bad lock balance when introspecting policy · ed2c7da3
      John Johansen 提交于
      BugLink: http://bugs.launchpad.net/bugs/1235977
      
      The profile introspection seq file has a locking bug when policy is viewed
      from a virtual root (task in a policy namespace), introspection from the
      real root is not affected.
      
      The test for root
          while (parent) {
      is correct for the real root, but incorrect for tasks in a policy namespace.
      This allows the task to walk backup the policy tree past its virtual root
      causing it to be unlocked before the virtual root should be in the p_stop
      fn.
      
      This results in the following lockdep back trace:
      [   78.479744] [ BUG: bad unlock balance detected! ]
      [   78.479792] 3.11.0-11-generic #17 Not tainted
      [   78.479838] -------------------------------------
      [   78.479885] grep/2223 is trying to release lock (&ns->lock) at:
      [   78.479952] [<ffffffff817bf3be>] mutex_unlock+0xe/0x10
      [   78.480002] but there are no more locks to release!
      [   78.480037]
      [   78.480037] other info that might help us debug this:
      [   78.480037] 1 lock held by grep/2223:
      [   78.480037]  #0:  (&p->lock){+.+.+.}, at: [<ffffffff812111bd>] seq_read+0x3d/0x3d0
      [   78.480037]
      [   78.480037] stack backtrace:
      [   78.480037] CPU: 0 PID: 2223 Comm: grep Not tainted 3.11.0-11-generic #17
      [   78.480037] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
      [   78.480037]  ffffffff817bf3be ffff880007763d60 ffffffff817b97ef ffff8800189d2190
      [   78.480037]  ffff880007763d88 ffffffff810e1c6e ffff88001f044730 ffff8800189d2190
      [   78.480037]  ffffffff817bf3be ffff880007763e00 ffffffff810e5bd6 0000000724fe56b7
      [   78.480037] Call Trace:
      [   78.480037]  [<ffffffff817bf3be>] ? mutex_unlock+0xe/0x10
      [   78.480037]  [<ffffffff817b97ef>] dump_stack+0x54/0x74
      [   78.480037]  [<ffffffff810e1c6e>] print_unlock_imbalance_bug+0xee/0x100
      [   78.480037]  [<ffffffff817bf3be>] ? mutex_unlock+0xe/0x10
      [   78.480037]  [<ffffffff810e5bd6>] lock_release_non_nested+0x226/0x300
      [   78.480037]  [<ffffffff817bf2fe>] ? __mutex_unlock_slowpath+0xce/0x180
      [   78.480037]  [<ffffffff817bf3be>] ? mutex_unlock+0xe/0x10
      [   78.480037]  [<ffffffff810e5d5c>] lock_release+0xac/0x310
      [   78.480037]  [<ffffffff817bf2b3>] __mutex_unlock_slowpath+0x83/0x180
      [   78.480037]  [<ffffffff817bf3be>] mutex_unlock+0xe/0x10
      [   78.480037]  [<ffffffff81376c91>] p_stop+0x51/0x90
      [   78.480037]  [<ffffffff81211408>] seq_read+0x288/0x3d0
      [   78.480037]  [<ffffffff811e9d9e>] vfs_read+0x9e/0x170
      [   78.480037]  [<ffffffff811ea8cc>] SyS_read+0x4c/0xa0
      [   78.480037]  [<ffffffff817ccc9d>] system_call_fastpath+0x1a/0x1f
      Signed-off-by: NJohn Johansen <john.johansen@canonical.com>
      Signed-off-by: NJames Morris <james.l.morris@oracle.com>
      ed2c7da3
    • J
      apparmor: fix memleak of the profile hash · 5cb3e91e
      John Johansen 提交于
      BugLink: http://bugs.launchpad.net/bugs/1235523
      
      This fixes the following kmemleak trace:
      unreferenced object 0xffff8801e8c35680 (size 32):
        comm "apparmor_parser", pid 691, jiffies 4294895667 (age 13230.876s)
        hex dump (first 32 bytes):
          e0 d3 4e b5 ac 6d f4 ed 3f cb ee 48 1c fd 40 cf  ..N..m..?..H..@.
          5b cc e9 93 00 00 00 00 00 00 00 00 00 00 00 00  [...............
        backtrace:
          [<ffffffff817a97ee>] kmemleak_alloc+0x4e/0xb0
          [<ffffffff811ca9f3>] __kmalloc+0x103/0x290
          [<ffffffff8138acbc>] aa_calc_profile_hash+0x6c/0x150
          [<ffffffff8138074d>] aa_unpack+0x39d/0xd50
          [<ffffffff8137eced>] aa_replace_profiles+0x3d/0xd80
          [<ffffffff81376937>] profile_replace+0x37/0x50
          [<ffffffff811e9f2d>] vfs_write+0xbd/0x1e0
          [<ffffffff811ea96c>] SyS_write+0x4c/0xa0
          [<ffffffff817ccb1d>] system_call_fastpath+0x1a/0x1f
          [<ffffffffffffffff>] 0xffffffffffffffff
      Signed-off-by: NJohn Johansen <john.johansen@canonical.com>
      Signed-off-by: NJames Morris <james.l.morris@oracle.com>
      5cb3e91e
    • L
      Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux · 34ec4de4
      Linus Torvalds 提交于
      Pull device tree fixes and reverts from Grant Likely:
       "One bug fix and three reverts.  The reverts back out the slightly
        controversial feeding the entire device tree into the random pool and
        the reserved-memory binding which isn't fully baked yet.  Expect the
        reserved-memory patches at least to resurface for v3.13.
      
        The bug fixes removes a scary but harmless warning on SPARC that was
        introduced in the v3.12 merge window.  v3.13 will contain a proper fix
        that makes the new code work on SPARC.
      
        On the plus side, the diffstat looks *awesome*.  I love removing lines
        of code"
      
      * tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux:
        Revert "drivers: of: add initialization code for dma reserved memory"
        Revert "ARM: init: add support for reserved memory defined by device tree"
        Revert "of: Feed entire flattened device tree into the random pool"
        of: fix unnecessary warning on missing /cpus node
      34ec4de4
    • L
      Merge branch 'fixes-for-v3.12' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping · ba0a062e
      Linus Torvalds 提交于
      Pull DMA-mapping fix from Marek Szyprowski:
       "A bugfix for the IOMMU-based implementation of dma-mapping subsystem
        for ARM architecture"
      
      * 'fixes-for-v3.12' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
        ARM: dma-mapping: Always pass proper prot flags to iommu_map()
      ba0a062e
    • L
      Merge git://git.kernel.org/pub/scm/virt/kvm/kvm · b83aea88
      Linus Torvalds 提交于
      Pull kvm fix from Gleb Natapov.
      
      * git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: Enable pvspinlock after jump_label_init() to avoid VM hang
      b83aea88
    • L
      Merge tag 'stable/for-linus-3.12-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 36704263
      Linus Torvalds 提交于
      Pull Xen fixes from Stefano Stabellini:
       "A small fix for Xen on x86_32 and a build fix for xen-tpmfront on
        arm64"
      
      * tag 'stable/for-linus-3.12-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen: Fix possible user space selector corruption
        tpm: xen-tpmfront: fix missing declaration of xen_domain
      36704263
  2. 15 10月, 2013 10 次提交
  3. 14 10月, 2013 13 次提交
    • G
      Revert "of: Feed entire flattened device tree into the random pool" · b920ecc8
      Grant Likely 提交于
      This reverts commit 109b6236.
      
      Tim Bird expressed concern that this will have a bad effect on boot
      time, and while simple tests have shown it to be okay with simple tree,
      a device tree blob can potentially be quite large and
      add_device_randomness() is not a fast function. Rather than do this for
      all platforms unconditionally, I'm reverting this patch and would like
      to see it revisited. Instead of feeding the entire tree into the random
      pool, it would probably be appropriate to hash the tree and feed the
      hash result into the pool. There really isn't a lot of randomness in a
      device tree anyway. In the majority of cases only a handful of
      properties are going to be different between machines with the same
      baseboard.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      b920ecc8
    • G
      of: fix unnecessary warning on missing /cpus node · 444c91e5
      Grant Likely 提交于
      Not all DT platforms have all the cpus collected under a /cpus node.
      That just happens to be a details of FDT, ePAPR and PowerPC platforms.
      Sparc does something different, but unfortunately the current code
      complains with a warning if /cpus isn't there. This became a problem
      with commit f86e4718, "driver/core cpu: initialize of_node in cpu's
      device structure", which caused the function to get called for all
      architectures.
      
      This commit is a temporary fix to fail silently if the cpus node isn't
      present. A proper fix will come later to allow arch code to provide a
      custom mechanism for decoding the CPU hwid if the 'reg' property isn't
      appropriate.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>
      Cc: Rob Herring <rob.herring@calxeda.com>
      444c91e5
    • L
      Linux 3.12-rc5 · 61e6cfa8
      Linus Torvalds 提交于
      61e6cfa8
    • L
      Merge git://www.linux-watchdog.org/linux-watchdog · 73cac03d
      Linus Torvalds 提交于
      Pull watchdog fixes from Wim Van Sebroeck:
       "This will fix a deadlock on the ts72xx_wdt driver, fix bitmasks in the
        kempld_wdt driver and fix a section mismatch in the sunxi_wdt driver"
      
      * git://www.linux-watchdog.org/linux-watchdog:
        watchdog: sunxi: Fix section mismatch
        watchdog: kempld_wdt: Fix bit mask definition
        watchdog: ts72xx_wdt: locking bug in ioctl
      73cac03d
    • M
      watchdog: sunxi: Fix section mismatch · 1d5898b4
      Maxime Ripard 提交于
      This driver has a section mismatch, for probe and remove functions,
      leading to the following warning during the compilation.
      
      WARNING: drivers/watchdog/built-in.o(.data+0x24): Section mismatch in
      reference from the variable sunxi_wdt_driver to the function
      .init.text:sunxi_wdt_probe()
      The variable sunxi_wdt_driver references
      the function __init sunxi_wdt_probe()
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
      1d5898b4
    • J
      watchdog: kempld_wdt: Fix bit mask definition · 4c4e4566
      Jingoo Han 提交于
      STAGE_CFG bits are defined as [5:4] bits. However, '(((x) & 0x30) << 4)'
      handles [9:8] bits. Thus, it should be fixed in order to handle
      [5:4] bits.
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
      4c4e4566
    • D
      watchdog: ts72xx_wdt: locking bug in ioctl · 8612ed0d
      Dan Carpenter 提交于
      Calling the WDIOC_GETSTATUS & WDIOC_GETBOOTSTATUS and twice will cause a
      interruptible deadlock.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
      8612ed0d
    • A
      ARM: 7851/1: check for number of arguments in syscall_get/set_arguments() · 3c1532df
      AKASHI Takahiro 提交于
      In ftrace_syscall_enter(),
          syscall_get_arguments(..., 0, n, ...)
              if (i == 0) { <handle ORIG_r0> ...; n--;}
              memcpy(..., n * sizeof(args[0]));
      If 'number of arguments(n)' is zero and 'argument index(i)' is also zero in
      syscall_get_arguments(), none of arguments should be copied by memcpy().
      Otherwise 'n--' can be a big positive number and unexpected amount of data
      will be copied. Tracing system calls which take no argument, say sync(void),
      may hit this case and eventually make the system corrupted.
      This patch fixes the issue both in syscall_get_arguments() and
      syscall_set_arguments().
      
      Cc: <stable@vger.kernel.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NAKASHI Takahiro <takahiro.akashi@linaro.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      3c1532df
    • L
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 3552570a
      Linus Torvalds 提交于
      Pull ARM SoC fixes from Olof Johansson:
       "A small batch of fixes this week, mostly OMAP related.  Nothing stands
        out as particularly controversial.
      
        Also a fix for a 3.12-rc1 timer regression for Exynos platforms,
        including the Chromebooks"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: exynos: dts: Update 5250 arch timer node with clock frequency
        ARM: OMAP2: RX-51: Add missing max_current to rx51_lp5523_led_config
        ARM: mach-omap2: board-generic: fix undefined symbol
        ARM: dts: Fix pinctrl mask for omap3
        ARM: OMAP3: Fix hardware detection for omap3630 when booted with device tree
        ARM: OMAP2: gpmc-onenand: fix sync mode setup with DT
      3552570a
    • Y
      ARM: exynos: dts: Update 5250 arch timer node with clock frequency · 4d594dd3
      Yuvaraj Kumar C D 提交于
      Without the "clock-frequency" property in arch timer node, could able
      to see the below crash dump.
      
      [<c0014e28>] (unwind_backtrace+0x0/0xf4) from [<c0011808>] (show_stack+0x10/0x14)
      [<c0011808>] (show_stack+0x10/0x14) from [<c036ac1c>] (dump_stack+0x7c/0xb0)
      [<c036ac1c>] (dump_stack+0x7c/0xb0) from [<c01ab760>] (Ldiv0_64+0x8/0x18)
      [<c01ab760>] (Ldiv0_64+0x8/0x18) from [<c0062f60>] (clockevents_config.part.2+0x1c/0x74)
      [<c0062f60>] (clockevents_config.part.2+0x1c/0x74) from [<c0062fd8>] (clockevents_config_and_register+0x20/0x2c)
      [<c0062fd8>] (clockevents_config_and_register+0x20/0x2c) from [<c02b8e8c>] (arch_timer_setup+0xa8/0x134)
      [<c02b8e8c>] (arch_timer_setup+0xa8/0x134) from [<c04b47b4>] (arch_timer_init+0x1f4/0x24c)
      [<c04b47b4>] (arch_timer_init+0x1f4/0x24c) from [<c04b40d8>] (clocksource_of_init+0x34/0x58)
      [<c04b40d8>] (clocksource_of_init+0x34/0x58) from [<c049ed8c>] (time_init+0x20/0x2c)
      [<c049ed8c>] (time_init+0x20/0x2c) from [<c049b95c>] (start_kernel+0x1e0/0x39c)
      
      THis is because the Exynos u-boot, for example on the Chromebooks, doesn't set
      up the CNTFRQ register as expected by arch_timer. Instead, we have to specify
      the frequency in the device tree like this.
      Signed-off-by: NYuvaraj Kumar C D <yuvaraj.cd@samsung.com>
      [olof: Changed subject, added comment, elaborated on commit message]
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      4d594dd3
    • O
      Merge tag 'fixes-against-v3.12-rc3-take2' of... · 98ead6e0
      Olof Johansson 提交于
      Merge tag 'fixes-against-v3.12-rc3-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      From Tony Lindgren:
      
      Few fixes for omap3 related hangs and errors that people have
      noticed now that people are actually using the device tree
      based booting for omap3.
      
      Also one regression fix for timer compile for dra7xx when
      omap5 is not selected, and a LED regression fix for n900.
      
      * tag 'fixes-against-v3.12-rc3-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: OMAP2: RX-51: Add missing max_current to rx51_lp5523_led_config
        ARM: mach-omap2: board-generic: fix undefined symbol
        ARM: dts: Fix pinctrl mask for omap3
        ARM: OMAP3: Fix hardware detection for omap3630 when booted with device tree
        ARM: OMAP2: gpmc-onenand: fix sync mode setup with DT
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      98ead6e0
    • L
      Merge branch 'parisc-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 2d4712b7
      Linus Torvalds 提交于
      Pull parisc fixes from Helge Deller:
       "This patchset includes a bugfix to prevent a kernel crash when memory
        in page zero is accessed by the kernel itself, e.g.  via
        probe_kernel_read().
      
        Furthermore we now export flush_cache_page() which is needed
        (indirectly) by the lustre filesystem.  The other patches remove
        unused functions and optimizes the page fault handler to only evaluate
        variables if needed, which again protects against possible kernel
        crashes"
      
      * 'parisc-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: let probe_kernel_read() capture access to page zero
        parisc: optimize variable initialization in do_page_fault
        parisc: fix interruption handler to respect pagefault_disable()
        parisc: mark parisc_terminate() noreturn and cold.
        parisc: remove unused syscall_ipi() function.
        parisc: kill SMP single function call interrupt
        parisc: Export flush_cache_page() (needed by lustre)
      2d4712b7
    • L
      Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma · 75c53188
      Linus Torvalds 提交于
      Pull slave-dmaengine fixes from Vinod Koul:
       "Another week, time to send another fixes request taking time out of
        extended weekend for the festivities in this part of the world.
      
        We have two fixes from Sergei for rcar driver and one fixing memory
        leak of edma driver by Geyslan"
      
      * 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
        dma: edma.c: remove edma_desc leakage
        rcar-hpbdma: add parameter to set_slave() method
        rcar-hpbdma: remove shdma_free_irq() calls
      75c53188
  4. 13 10月, 2013 11 次提交