1. 01 Oct, 2015 10 commits
  2. 30 Sep, 2015 4 commits
  3. 29 Sep, 2015 4 commits
    • shengyong's avatar
      UBI: return ENOSPC if no enough space available · 7c7feb2e
      shengyong authored
      UBI: attaching mtd1 to ubi0
      UBI: scanning is finished
      UBI error: init_volumes: not enough PEBs, required 706, available 686
      UBI error: ubi_wl_init: no enough physical eraseblocks (-20, need 1)
      UBI error: ubi_attach_mtd_dev: failed to attach mtd1, error -12 <= NOT ENOMEM
      UBI error: ubi_init: cannot attach mtd1
      
      If available PEBs are not enough when initializing volumes, return -ENOSPC
      directly. If available PEBs are not enough when initializing WL, return
      -ENOSPC instead of -ENOMEM.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarSheng Yong <shengyong1@huawei.com>
      Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
      Reviewed-by: default avatarDavid Gstir <david@sigma-star.at>
      7c7feb2e
    • Richard Weinberger's avatar
      UBI: Validate data_size · 281fda27
      Richard Weinberger authored
      Make sure that data_size is less than LEB size.
      Otherwise a handcrafted UBI image is able to trigger
      an out of bounds memory access in ubi_compare_lebs().
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
      Reviewed-by: default avatarDavid Gstir <david@sigma-star.at>
      281fda27
    • Richard Weinberger's avatar
      UBIFS: Kill unneeded locking in ubifs_init_security · cf6f54e3
      Richard Weinberger authored
      Fixes the following lockdep splat:
      [    1.244527] =============================================
      [    1.245193] [ INFO: possible recursive locking detected ]
      [    1.245193] 4.2.0-rc1+ #37 Not tainted
      [    1.245193] ---------------------------------------------
      [    1.245193] cp/742 is trying to acquire lock:
      [    1.245193]  (&sb->s_type->i_mutex_key#9){+.+.+.}, at: [<ffffffff812b3f69>] ubifs_init_security+0x29/0xb0
      [    1.245193]
      [    1.245193] but task is already holding lock:
      [    1.245193]  (&sb->s_type->i_mutex_key#9){+.+.+.}, at: [<ffffffff81198e7f>] path_openat+0x3af/0x1280
      [    1.245193]
      [    1.245193] other info that might help us debug this:
      [    1.245193]  Possible unsafe locking scenario:
      [    1.245193]
      [    1.245193]        CPU0
      [    1.245193]        ----
      [    1.245193]   lock(&sb->s_type->i_mutex_key#9);
      [    1.245193]   lock(&sb->s_type->i_mutex_key#9);
      [    1.245193]
      [    1.245193]  *** DEADLOCK ***
      [    1.245193]
      [    1.245193]  May be due to missing lock nesting notation
      [    1.245193]
      [    1.245193] 2 locks held by cp/742:
      [    1.245193]  #0:  (sb_writers#5){.+.+.+}, at: [<ffffffff811ad37f>] mnt_want_write+0x1f/0x50
      [    1.245193]  #1:  (&sb->s_type->i_mutex_key#9){+.+.+.}, at: [<ffffffff81198e7f>] path_openat+0x3af/0x1280
      [    1.245193]
      [    1.245193] stack backtrace:
      [    1.245193] CPU: 2 PID: 742 Comm: cp Not tainted 4.2.0-rc1+ #37
      [    1.245193] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5-0-ge51488c-20140816_022509-build35 04/01/2014
      [    1.245193]  ffffffff8252d530 ffff88007b023a38 ffffffff814f6f49 ffffffff810b56c5
      [    1.245193]  ffff88007c30cc80 ffff88007b023af8 ffffffff810a150d ffff88007b023a68
      [    1.245193]  000000008101302a ffff880000000000 00000008f447e23f ffffffff8252d500
      [    1.245193] Call Trace:
      [    1.245193]  [<ffffffff814f6f49>] dump_stack+0x4c/0x65
      [    1.245193]  [<ffffffff810b56c5>] ? console_unlock+0x1c5/0x510
      [    1.245193]  [<ffffffff810a150d>] __lock_acquire+0x1a6d/0x1ea0
      [    1.245193]  [<ffffffff8109fa78>] ? __lock_is_held+0x58/0x80
      [    1.245193]  [<ffffffff810a1a93>] lock_acquire+0xd3/0x270
      [    1.245193]  [<ffffffff812b3f69>] ? ubifs_init_security+0x29/0xb0
      [    1.245193]  [<ffffffff814fc83b>] mutex_lock_nested+0x6b/0x3a0
      [    1.245193]  [<ffffffff812b3f69>] ? ubifs_init_security+0x29/0xb0
      [    1.245193]  [<ffffffff812b3f69>] ? ubifs_init_security+0x29/0xb0
      [    1.245193]  [<ffffffff812b3f69>] ubifs_init_security+0x29/0xb0
      [    1.245193]  [<ffffffff8128e286>] ubifs_create+0xa6/0x1f0
      [    1.245193]  [<ffffffff81198e7f>] ? path_openat+0x3af/0x1280
      [    1.245193]  [<ffffffff81195d15>] vfs_create+0x95/0xc0
      [    1.245193]  [<ffffffff8119929c>] path_openat+0x7cc/0x1280
      [    1.245193]  [<ffffffff8109ffe3>] ? __lock_acquire+0x543/0x1ea0
      [    1.245193]  [<ffffffff81088f20>] ? sched_clock_cpu+0x90/0xc0
      [    1.245193]  [<ffffffff81088c00>] ? calc_global_load_tick+0x60/0x90
      [    1.245193]  [<ffffffff81088f20>] ? sched_clock_cpu+0x90/0xc0
      [    1.245193]  [<ffffffff811a9cef>] ? __alloc_fd+0xaf/0x180
      [    1.245193]  [<ffffffff8119ac55>] do_filp_open+0x75/0xd0
      [    1.245193]  [<ffffffff814ffd86>] ? _raw_spin_unlock+0x26/0x40
      [    1.245193]  [<ffffffff811a9cef>] ? __alloc_fd+0xaf/0x180
      [    1.245193]  [<ffffffff81189bd9>] do_sys_open+0x129/0x200
      [    1.245193]  [<ffffffff81189cc9>] SyS_open+0x19/0x20
      [    1.245193]  [<ffffffff81500717>] entry_SYSCALL_64_fastpath+0x12/0x6f
      
      While the lockdep splat is a false positive, becuase path_openat holds i_mutex
      of the parent directory and ubifs_init_security() tries to acquire i_mutex
      of a new inode, it reveals that taking i_mutex in ubifs_init_security() is
      in vain because it is only being called in the inode allocation path
      and therefore nobody else can see the inode yet.
      
      Cc: stable@vger.kernel.org # 3.20-
      Reported-and-tested-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
      Reviewed-and-tested-by: default avatarDongsheng Yang <yangds.fnst@cn.fujitsu.com>
      Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
      Signed-off-by: dedekind1@gmail.com
      cf6f54e3
    • James Morris's avatar
      Merge tag 'keys-fixes-20150925' of... · 02667151
      James Morris authored
      Merge tag 'keys-fixes-20150925' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into for-linus
      
      Keyrings fixes from David Howells, for current Linus.
      02667151
  4. 28 Sep, 2015 7 commits
  5. 27 Sep, 2015 15 commits
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 097f70b3
      Linus Torvalds authored
      Pull MIPS fixes from Ralf Baechle:
       - Properly setup irq handling for ATH79 platforms
       - Fix bootmem mapstart calculation for contiguous maps
       - Handle little endian and older CPUs correct in BPF
       - Fix console for Fulong 2E systems
       - Handle FTLB correctly on R6 CPUs
       - Fixes for CM, GIC and MAAR support code
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: Initialise MAARs on secondary CPUs
        MIPS: print MAAR configuration during boot
        MIPS: mm: compile maar_init unconditionally
        irqchip: mips-gic: Fix pending & mask reads for MIPS64 with 32b GIC.
        irqchip: mips-gic: Convert CPU numbers to VP IDs.
        MIPS: CM: Provide a function to map from CPU to VP ID.
        MIPS: Fix FTLB detection for R6
        MIPS: cpu-features: Add cpu_has_ftlb
        MIPS: ATH79: Add irq chip ar7240-misc-intc
        MIPS: ATH79: Set missing irq ack handler for ar7100-misc-intc irq chip
        MIPS: BPF: Fix build on pre-R2 little endian CPUs
        MIPS: BPF: Avoid unreachable code on little endian
        MIPS: bootmem: Fix mapstart calculation for contiguous maps
        MIPS: Fix console output for Fulong2e system
      097f70b3
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e3be4266
      Linus Torvalds authored
      Pull perf fixes from Thomas Gleixner:
       "Another pile of fixes for perf:
      
         - Plug overflows and races in the core code
      
         - Sanitize the flow of the perf syscall so we error out before
           handling the more complex and hard to undo setups
      
         - Improve and fix Broadwell and Skylake hardware support
      
         - Revert a fix which broke what it tried to fix in perf tools
      
         - A couple of smaller fixes in various places of perf tools"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf tools: Fix copying of /proc/kcore
        perf intel-pt: Remove no_force_psb from documentation
        perf probe: Use existing routine to look for a kernel module by dso->short_name
        perf/x86: Change test_aperfmperf() and test_intel() to static
        tools lib traceevent: Fix string handling in heterogeneous arch environments
        perf record: Avoid infinite loop at buildid processing with no samples
        perf: Fix races in computing the header sizes
        perf: Fix u16 overflows
        perf: Restructure perf syscall point of no return
        perf/x86/intel: Fix Skylake FRONTEND MSR extrareg mask
        perf/x86/intel/pebs: Add PEBS frontend profiling for Skylake
        perf/x86/intel: Make the CYCLE_ACTIVITY.* constraint on Broadwell more specific
        perf tools: Bool functions shouldn't return -1
        tools build: Add test for presence of __get_cpuid() gcc builtin
        tools build: Add test for presence of numa_num_possible_cpus() in libnuma
        Revert "perf symbols: Fix mismatched declarations for elf_getphdrnum"
        perf stat: Fix per-pkg event reporting bug
      e3be4266
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 73f479b2
      Linus Torvalds authored
      Pull scheduler fix from Thomas Gleixner:
       "A single bug fix for the scheduler to prevent dequeueing of the idle
        task when setting the cpus allowed mask"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched: Fix crash trying to dequeue/enqueue the idle thread
      73f479b2
    • Linus Torvalds's avatar
      Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · fc11a9c5
      Linus Torvalds authored
      Pull locking fix from Thomas Gleixner:
       "A single bugfix for lockdep to preserve the pinning counter when
        rebuilding the lock stack"
      
      * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        locking/lockdep: Fix hlock->pin_count reset on lock stack rebuilds
      fc11a9c5
    • Paul Burton's avatar
      MIPS: Initialise MAARs on secondary CPUs · e060f6ed
      Paul Burton authored
      MAARs should be initialised on each CPU (or rather, core) in the system
      in order to achieve consistent behaviour & performance. Previously they
      have only been initialised on the boot CPU which leads to performance
      problems if tasks are later scheduled on a secondary CPU, particularly
      if those tasks make use of unaligned vector accesses where some CPUs
      don't handle any cases in hardware for non-speculative memory regions.
      Fix this by recording the MAAR configuration from the boot CPU and
      applying it to secondary CPUs as part of their bringup.
      Reported-by: default avatarDoug Gilmore <doug.gilmore@imgtec.com>
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: Andrew Bresticker <abrestic@chromium.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: David Hildenbrand <dahi@linux.vnet.ibm.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Hemmo Nieminen <hemmo.nieminen@iki.fi>
      Cc: Alex Smith <alex.smith@imgtec.com>
      Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
      Patchwork: https://patchwork.linux-mips.org/patch/11239/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      e060f6ed
    • Paul Burton's avatar
      MIPS: print MAAR configuration during boot · 651ca7f4
      Paul Burton authored
      Verifying that the MAAR configuration is as expected is useful when
      debugging the performance of a system. Print out the memory regions
      configured via MAAR along with their attributes.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: David Hildenbrand <dahi@linux.vnet.ibm.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
      Patchwork: https://patchwork.linux-mips.org/patch/11238/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      651ca7f4
    • Paul Burton's avatar
      MIPS: mm: compile maar_init unconditionally · def3ab5d
      Paul Burton authored
      maar_init was previously only compiled when CONFIG_NEED_MULTIPLE_NODES
      was not set, which has been fine since it is only called from the
      standard implementation of mem_init which has the same condition. In
      preparation for calling it from the SMP startup code on secondary CPUs,
      move maar_init outside of the #ifndef such that it is always compiled.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: David Hildenbrand <dahi@linux.vnet.ibm.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: Ingo Molnar <mingo@kernel.org>
      Patchwork: https://patchwork.linux-mips.org/patch/11237/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      def3ab5d
    • Paul Burton's avatar
      irqchip: mips-gic: Fix pending & mask reads for MIPS64 with 32b GIC. · d77d5ac9
      Paul Burton authored
      gic_handle_shared_int reads the GIC interrupt pending & mask registers
      directly into a bitmap, which is defined as an array of unsigned longs.
      The GIC pending registers may be 32 bits wide if the CM is older than
      CM3, regardless of the bit width of the CPU, but for MIPS64 kernels
      the unsigned longs in the bitmap will be 64 bits wide. In this case we
      need to perform 2 x 32 bit reads per 64 bit unsigned long in order to
      avoid missing interrupts.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: linux-mips@linux-mips.org
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11213/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      d77d5ac9
    • Paul Burton's avatar
      irqchip: mips-gic: Convert CPU numbers to VP IDs. · ab41f6c8
      Paul Burton authored
      Make use of the mips_cm_vp_id function to convert from Linux CPU numbers
      to the VP IDs used by hardware, which are not identical in all systems.
      Without doing so we map interrupts to incorrect VP(E)s.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: linux-mips@linux-mips.org
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11212/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      ab41f6c8
    • Paul Burton's avatar
      MIPS: CM: Provide a function to map from CPU to VP ID. · 7573b94e
      Paul Burton authored
      The VP ID of a given CPU may not match up with the CPU number used by
      Linux. For example, if the width of the VP part of the VP ID is wider
      than log2(number of VPs per core) and the system has multiple cores then
      this will be the case. Alternatively, if a pre-r6 system implements the
      MT ASE with multiple VPEs per core and Linux is built without support
      for the MT ASE then the numbers won't match up either. Provide a
      function to convert from CPU number to VP ID.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11211/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      7573b94e
    • Linus Torvalds's avatar
      Linux 4.3-rc3 · 9ffecb10
      Linus Torvalds authored
      9ffecb10
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 162e6df4
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "Two bugfixes from Andy addressing at least some of the subtle NMI
        related wreckage which has been reported by Sasha Levin"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/nmi/64: Fix a paravirt stack-clobbering bug in the NMI code
        x86/paravirt: Replace the paravirt nop with a bona fide empty function
      162e6df4
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 5a6bdf06
      Linus Torvalds authored
      Pull irq fix from Thomass Gleixner:
       "A bugfix for the atmel aic5 irq chip driver which caches the wrong
        data and thereby breaking resume"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/atmel-aic5: Use per chip mask caches in mask/unmask()
      5a6bdf06
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm · c905929a
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "Just two fixes: wire up the new system calls added during the last
        merge window, and fix another user access site"
      
      * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
        ARM: alignment: fix alignment handling for uaccess changes
        ARM: wire up new syscalls
      c905929a
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 685b5f1d
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "Our first real batch of fixes this release cycle.  Nothing really
        concerning, and diffstat is a bit inflated due to some DT contents
        moving around on STi platforms.
      
        There's a collection of them here:
      
         - A fixup for a build breakage that hits on arm64 allmodconfig in
           QCOM SCM firmware drivers
         - MMC fixes for OMAP that had quite a bit of breakage this merge
           window.
         - Misc build/warning fixes on PXA and OMAP
         - A couple of minor fixes for Beagleboard X15 which is now starting
           to see a few more users in the wild"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (31 commits)
        ARM: sti: dt: adapt DT to fix probe/bind issues in DRM driver
        ARM: dts: fix omap2+ address translation for pbias
        firmware: qcom: scm: Add function stubs for ARM64
        ARM: dts: am57xx-beagle-x15: use palmas-usb for USB2
        ARM: omap2plus_defconfig: enable GPIO_PCA953X
        ARM: dts: omap5-uevm.dts: fix i2c5 pinctrl offsets
        ARM: OMAP2+: AM43XX: Enable autoidle for clks in am43xx_init_late
        ARM: dts: am57xx-beagle-x15: Update Phy supplies
        ARM: pxa: balloon3: Fix build error
        ARM: dts: Fixup model name for HP t410 dts
        ARM: dts: DRA7: fix a typo in ethernet
        ARM: omap2plus_defconfig: make PCF857x built-in
        ARM: dts: Use ti,pbias compatible string for pbias
        ARM: OMAP5: Cleanup options for SoC only build
        ARM: DRA7: Select missing options for SoC only build
        ARM: OMAP2+: board-generic: Remove stale of_irq macros
        ARM: OMAP4+: PM: erratum is used by OMAP5 and DRA7 as well
        ARM: dts: omap3-igep: Move eth IRQ pinmux to IGEPv2 common dtsi
        ARM: dts: am57xx-beagle-x15: Add wakeup irq for mcp79410
        ARM: dts: am335x-phycore-som: Fix mpu voltage
        ...
      685b5f1d