Skip to content
  1. Jun 28, 2017
  2. Jun 27, 2017
    • Krzysztof Kozlowski's avatar
      MIPS: defconfig: Cleanup from old Kconfig options · 59baa24d
      Krzysztof Kozlowski authored
      
      
      Remove old, dead Kconfig options (in order appearing in this commit):
       - EXPERIMENTAL is gone since v3.9;
       - INET_LRO: commit 7bbf3cae ("ipv4: Remove inet_lro library");
       - MTD_CONCAT: commit f53fdebc ("mtd: drop MTD_CONCAT from Kconfig
         entirely");
       - MTD_CHAR: commit 660685d9 ("mtd: merge mtdchar module with
         mtdcore");
       - NETDEV_1000 and NETDEV_10000: commit f860b052 ("drivers/net:
         Kconfig and Makefile cleanup"); NET_ETHERNET should be replaced with
         just ETHERNET but that is separate change;
       - MISC_DEVICES: commit 7c5763b8 ("drivers: misc: Remove
         MISC_DEVICES config option");
       - HID_SUPPORT: commit 1f41a6a9 ("HID: Fix the generic Kconfig
         options");
       - BT_L2CAP and BT_SCO: commit f1e91e16 ("Bluetooth: Always compile
         SCO and L2CAP in Bluetooth Core");
       - DEBUG_ERRORS: commit b025a3f8 ("ARM: 6876/1: Kconfig.debug:
         Remove unused CONFIG_DEBUG_ERRORS");
       - USB_DEVICE_CLASS: commit 007bab91 ("USB: remove
         CONFIG_USB_DEVICE_CLASS");
       - RCU_CPU_STALL_DETECTOR: commit a00e0d71 ("rcu: Remove conditional
         compilation for RCU CPU stall warnings");
       - IP_NF_QUEUE: commit 3dd6664f ("netfilter: remove unused "config
         IP_NF_QUEUE"");
       - IP_NF_TARGET_ULOG: commit d4da843e ("netfilter: kill remnants of
         ulog targets");
       - IP6_NF_QUEUE: commit d16cf20e ("netfilter: remove ip_queue
         support");
       - IP6_NF_TARGET_LOG: commit 6939c33a ("netfilter: merge ipt_LOG and
         ip6_LOG into xt_LOG");
       - USB_LED: commit a335aaf3 ("usb: misc: remove outdated USB LED
         driver");
       - MMC_UNSAFE_RESUME: commit 2501c917 ("mmc: core: Use
         MMC_UNSAFE_RESUME as default behavior");
       - AUTOFS_FS: commit 561c5cf9 ("staging: Remove autofs3");
       - VIDEO_OUTPUT_CONTROL: commit f167a64e ("video / output: Drop
         display output class support");
       - USB_LIBUSUAL: commit f61870ee ("usb: remove libusual");
       - CRYPTO_ZLIB: 11049218 ("crypto: compress - remove unused pcomp
         interface");
       - BLK_DEV_UB: commit 68a5059e ("block: remove the deprecated ub
         driver");
      
      Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: bcm-kernel-feedback-list@broadcom.com
      Cc: linux-mips@linux-mips.org
      Cc: linux-arm-kernel@lists.infradead.org
      Patchwork: https://patchwork.linux-mips.org/patch/16342/
      
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      59baa24d
    • Matt Redfearn's avatar
      MIPS: Sort MIPS Kconfig Alphabetically. · 12597988
      Matt Redfearn authored
      
      
      Sort the entries in config MIPS alphabetically so as to make entries
      easier to find.
      
      Signed-off-by: default avatarMatt Redfearn <matt.redfearn@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/16068/
      
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      12597988
  3. Jun 26, 2017
  4. Jun 25, 2017
  5. Jun 24, 2017
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace · f65013d6
      Linus Torvalds authored
      
      
      Pull timer fix from Eric Biederman:
       "This fixes an issue of confusing injected signals with the signals
        from posix timers that has existed since posix timers have been in the
        kernel.
      
        This patch is slightly simpler than my earlier version of this patch
        as I discovered in testing that I had misspelled "#ifdef
        CONFIG_POSIX_TIMERS". So I deleted that unnecessary test and made
        setting of resched_timer uncondtional.
      
        I have tested this and verified that without this patch there is a
        nasty hang that is easy to trigger, and with this patch everything
        works properly"
      
      Thomas Gleixner dixit:
       "It fixes the problem at hand and covers the ptrace case as well, which
        I missed.
      
      Reviewed-and-tested-by: default avatarThomas Gleixner <tglx@linutronix.de&gt;">
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
        signal: Only reschedule timers on signals timers have sent
      f65013d6
    • Thomas Gleixner's avatar
      x86/mshyperv: Remove excess #includes from mshyperv.h · 26fcd952
      Thomas Gleixner authored
      
      
      A recent commit included linux/slab.h in linux/irq.h. This breaks the build
      of vdso32 on a 64-bit kernel.
      
      The reason is that linux/irq.h gets included into the vdso code via
      linux/interrupt.h which is included from asm/mshyperv.h. That makes the
      32-bit vdso compile fail, because slab.h includes the pgtable headers for
      64-bit on a 64-bit build.
      
      Neither linux/clocksource.h nor linux/interrupt.h are needed in the
      mshyperv.h header file itself - it has a dependency on <linux/atomic.h>.
      
      Remove the includes and unbreak the build.
      
      Reported-by: default avatarIngo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: K. Y. Srinivasan <kys@microsoft.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
      Cc: devel@linuxdriverproject.org
      Fixes: dee863b5 ("hv: export current Hyper-V clocksource")
      Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1706231038460.2647@nanos
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      26fcd952
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.12-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 94a6df25
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "Some more powerpc fixes for 4.12. Most of these actually came in last
        week but got held up for some more testing.
      
         - three fixes for kprobes/ftrace/livepatch interactions.
      
         - properly handle data breakpoints when using the Radix MMU.
      
         - fix for perf sampling of registers during call_usermodehelper().
      
         - properly initialise the thread_info on our emergency stacks
      
         - add an explicit flush when doing TLB invalidations for a process
           using NPU2.
      
        Thanks to: Alistair Popple, Naveen N. Rao, Nicholas Piggin, Ravi
        Bangoria, Masami Hiramatsu"
      
      * tag 'powerpc-4.12-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/64: Initialise thread_info for emergency stacks
        powerpc/powernv/npu-dma: Add explicit flush when sending an ATSD
        powerpc/perf: Fix oops when kthread execs user process
        powerpc/64s: Handle data breakpoints in Radix mode
        powerpc/kprobes: Skip livepatch_handler() for jprobes
        powerpc/ftrace: Pass the correct stack pointer for DYNAMIC_FTRACE_WITH_REGS
        powerpc/kprobes: Pause function_graph tracing during jprobes handling
      94a6df25
    • Linus Torvalds's avatar
      Merge tag 'acpi-4.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · cd5545ae
      Linus Torvalds authored
      Pull ACPI fix from Rafael Wysocki:
       "This fixes the ACPI-based enumeration of some I2C and SPI devices
        broken in 4.11.
      
        Specifics:
      
         - I2C and SPI devices are expected to be enumerated by the I2C and
           SPI subsystems, respectively, but due to a change made during the
           4.11 cycle, in some cases the ACPI core marks them as already
           enumerated which causes the I2C and SPI subsystems to overlook
           them, so fix that (Jarkko Nikula)"
      
      * tag 'acpi-4.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / scan: Fix enumeration for special SPI and I2C devices
      cd5545ae
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · ba6cbdb6
      Linus Torvalds authored
      Pull i2c fix from Wolfram Sang.
      
      * 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: imx: Use correct function to write to register
      ba6cbdb6
    • Linus Torvalds's avatar
      Merge tag 'gpio-v4.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · 25b2398f
      Linus Torvalds authored
      Pull GPIO fix from Linus Walleij:
       "A single GPIO patch fixing the compatible string for the MVEBU PWM
        controller embedded in the GPIO controller before we release v4.12.
        Hopefully"
      
      * tag 'gpio-v4.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        gpio: mvebu: change compatible string for PWM support
      25b2398f
    • Linus Torvalds's avatar
      Merge tag 'sound-4.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 51c933f2
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Nothing exciting here, just a few stable fixes:
      
         - suppress spurious kernel WARNING in PCM core
      
         - fix potential spin deadlock at error handling in firewire
      
         - HD-audio PCI ID addition / fixup"
      
      * tag 'sound-4.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - Apply quirks to Broxton-T, too
        ALSA: firewire-lib: Fix stall of process context at packet error
        ALSA: pcm: Don't treat NULL chmap as a fatal error
        ALSA: hda - Add Coffelake PCI ID
      51c933f2
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-v4.12-rc7' of git://people.freedesktop.org/~airlied/linux · 311548f1
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "A varied bunch of fixes, one for an API regression with connectors.
      
        Otherwise amdgpu and i915 have a bunch of varied fixes, the shrinker
        ones being the most important"
      
      * tag 'drm-fixes-for-v4.12-rc7' of git://people.freedesktop.org/~airlied/linux:
        drm: Fix GETCONNECTOR regression
        drm/radeon: add a quirk for Toshiba Satellite L20-183
        drm/radeon: add a PX quirk for another K53TK variant
        drm/amdgpu: adjust default display clock
        drm/amdgpu/atom: fix ps allocation size for EnableDispPowerGating
        drm/amdgpu: add Polaris12 DID
        drm/i915: Don't enable backlight at setup time.
        drm/i915: Plumb the correct acquire ctx into intel_crtc_disable_noatomic()
        drm/i915: Fix deadlock witha the pipe A quirk during resume
        drm/i915: Remove __GFP_NORETRY from our buffer allocator
        drm/i915: Encourage our shrinker more when our shmemfs allocations fails
        drm/i915: Differentiate between sw write location into ring and last hw read
      311548f1
    • Linus Torvalds's avatar
      Merge tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random · 7139a06b
      Linus Torvalds authored
      Pull random fixes from Ted Ts'o:
       "Fix some locking and gcc optimization issues from the most recent
        random_for_linus_stable pull request"
      
      * tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random:
        random: silence compiler warnings and fix race
      7139a06b
    • Linus Torvalds's avatar
      Merge tag 'for-4.12/dm-fixes-4' of... · 7ec2f7e8
      Linus Torvalds authored
      Merge tag 'for-4.12/dm-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper fixes from Mike Snitzer:
      
       - a revert of a DM mirror commit that has proven to make the code prone
         to crash
      
       - a DM io reference count fix that resolves a NULL pointer seen when
         issuing discards to a DM mirror target's device whose mirror legs do
         not all support discards
      
       - a couple DM integrity fixes
      
      * tag 'for-4.12/dm-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm io: fix duplicate bio completion due to missing ref count
        dm integrity: fix to not disable/enable interrupts from interrupt context
        Revert "dm mirror: use all available legs on multiple failures"
        dm integrity: reject mappings too large for device
      7ec2f7e8
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 337c6ba2
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "8 fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        fs/exec.c: account for argv/envp pointers
        ocfs2: fix deadlock caused by recursive locking in xattr
        slub: make sysfs file removal asynchronous
        lib/cmdline.c: fix get_options() overflow while parsing ranges
        fs/dax.c: fix inefficiency in dax_writeback_mapping_range()
        autofs: sanity check status reported with AUTOFS_DEV_IOCTL_FAIL
        mm/vmalloc.c: huge-vmap: fail gracefully on unexpected huge vmap mappings
        mm, thp: remove cond_resched from __collapse_huge_page_copy
      337c6ba2
    • Kees Cook's avatar
      fs/exec.c: account for argv/envp pointers · 98da7d08
      Kees Cook authored
      When limiting the argv/envp strings during exec to 1/4 of the stack limit,
      the storage of the pointers to the strings was not included.  This means
      that an exec with huge numbers of tiny strings could eat 1/4 of the stack
      limit in strings and then additional space would be later used by the
      pointers to the strings.
      
      For example, on 32-bit with a 8MB stack rlimit, an exec with 1677721
      single-byte strings would consume less than 2MB of stack, the max (8MB /
      4) amount allowed, but the pointers to the strings would consume the
      remaining additional stack space (1677721 * 4 == 6710884).
      
      The result (1677721 + 6710884 == 8388605) would exhaust stack space
      entirely.  Controlling this stack exhaustion could result in
      pathological behavior in setuid binaries (CVE-2017-1000365).
      
      [akpm@linux-foundation.org: additional commenting from Kees]
      Fixes: b6a2fea3 ("mm: variable length argument support")
      Link: http://lkml.kernel.org/r/20170622001720.GA32173@beast
      
      
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Acked-by: default avatarRik van Riel <riel@redhat.com>
      Acked-by: default avatarMichal Hocko <mhocko@suse.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Qualys Security Advisory <qsa@qualys.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      98da7d08
    • Eric Ren's avatar
      ocfs2: fix deadlock caused by recursive locking in xattr · 8818efaa
      Eric Ren authored
      Another deadlock path caused by recursive locking is reported.  This
      kind of issue was introduced since commit 743b5f14 ("ocfs2: take
      inode lock in ocfs2_iop_set/get_acl()").  Two deadlock paths have been
      fixed by commit b891fa50 ("ocfs2: fix deadlock issue when taking
      inode lock at vfs entry points").  Yes, we intend to fix this kind of
      case in incremental way, because it's hard to find out all possible
      paths at once.
      
      This one can be reproduced like this.  On node1, cp a large file from
      home directory to ocfs2 mountpoint.  While on node2, run
      setfacl/getfacl.  Both nodes will hang up there.  The backtraces:
      
      On node1:
        __ocfs2_cluster_lock.isra.39+0x357/0x740 [ocfs2]
        ocfs2_inode_lock_full_nested+0x17d/0x840 [ocfs2]
        ocfs2_write_begin+0x43/0x1a0 [ocfs2]
        generic_perform_write+0xa9/0x180
        __generic_file_write_iter+0x1aa/0x1d0
        ocfs2_file_write_iter+0x4f4/0xb40 [ocfs2]
        __vfs_write+0xc3/0x130
        vfs_write+0xb1/0x1a0
        SyS_write+0x46/0xa0
      
      On node2:
        __ocfs2_cluster_lock.isra.39+0x357/0x740 [ocfs2]
        ocfs2_inode_lock_full_nested+0x17d/0x840 [ocfs2]
        ocfs2_xattr_set+0x12e/0xe80 [ocfs2]
        ocfs2_set_acl+0x22d/0x260 [ocfs2]
        ocfs2_iop_set_acl+0x65/0xb0 [ocfs2]
        set_posix_acl+0x75/0xb0
        posix_acl_xattr_set+0x49/0xa0
        __vfs_setxattr+0x69/0x80
        __vfs_setxattr_noperm+0x72/0x1a0
        vfs_setxattr+0xa7/0xb0
        setxattr+0x12d/0x190
        path_setxattr+0x9f/0xb0
        SyS_setxattr+0x14/0x20
      
      Fix this one by using ocfs2_inode_{lock|unlock}_tracker, which is
      exported by commit 439a36b8 ("ocfs2/dlmglue: prepare tracking logic
      to avoid recursive cluster lock").
      
      Link: http://lkml.kernel.org/r/20170622014746.5815-1-zren@suse.com
      
      
      Fixes: 743b5f14 ("ocfs2: take inode lock in ocfs2_iop_set/get_acl()")
      Signed-off-by: default avatarEric Ren <zren@suse.com>
      Reported-by: default avatarThomas Voegtle <tv@lio96.de>
      Tested-by: default avatarThomas Voegtle <tv@lio96.de>
      Reviewed-by: default avatarJoseph Qi <jiangqi903@gmail.com>
      Cc: Mark Fasheh <mfasheh@versity.com>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Junxiao Bi <junxiao.bi@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8818efaa
    • Tejun Heo's avatar
      slub: make sysfs file removal asynchronous · 3b7b3140
      Tejun Heo authored
      Commit bf5eb3de ("slub: separate out sysfs_slab_release() from
      sysfs_slab_remove()") made slub sysfs file removals synchronous to
      kmem_cache shutdown.
      
      Unfortunately, this created a possible ABBA deadlock between slab_mutex
      and sysfs draining mechanism triggering the following lockdep warning.
      
        ======================================================
        [ INFO: possible circular locking dependency detected ]
        4.10.0-test+ #48 Not tainted
        -------------------------------------------------------
        rmmod/1211 is trying to acquire lock:
         (s_active#120){++++.+}, at: [<ffffffff81308073>] kernfs_remove+0x23/0x40
      
        but task is already holding lock:
         (slab_mutex){+.+.+.}, at: [<ffffffff8120f691>] kmem_cache_destroy+0x41/0x2d0
      
        which lock already depends on the new lock.
      
        the existing dependency chain (in reverse order) is:
      
        -> #1 (slab_mutex){+.+.+.}:
      	 lock_acquire+0xf6/0x1f0
      	 __mutex_lock+0x75/0x950
      	 mutex_lock_nested+0x1b/0x20
      	 slab_attr_store+0x75/0xd0
      	 sysfs_kf_write+0x45/0x60
      	 kernfs_fop_write+0x13c/0x1c0
      	 __vfs_write+0x28/0x120
      	 vfs_write+0xc8/0x1e0
      	 SyS_write+0x49/0xa0
      	 entry_SYSCALL_64_fastpath+0x1f/0xc2
      
        -> #0 (s_active#120){++++.+}:
      	 __lock_acquire+0x10ed/0x1260
      	 lock_acquire+0xf6/0x1f0
      	 __kernfs_remove+0x254/0x320
      	 kernfs_remove+0x23/0x40
      	 sysfs_remove_dir+0x51/0x80
      	 kobject_del+0x18/0x50
      	 __kmem_cache_shutdown+0x3e6/0x460
      	 kmem_cache_destroy+0x1fb/0x2d0
      	 kvm_exit+0x2d/0x80 [kvm]
      	 vmx_exit+0x19/0xa1b [kvm_intel]
      	 SyS_delete_module+0x198/0x1f0
      	 entry_SYSCALL_64_fastpath+0x1f/0xc2
      
        other info that might help us debug this:
      
         Possible unsafe locking scenario:
      
      	 CPU0                    CPU1
      	 ----                    ----
          lock(slab_mutex);
      				 lock(s_active#120);
      				 lock(slab_mutex);
          lock(s_active#120);
      
         *** DEADLOCK ***
      
        2 locks held by rmmod/1211:
         #0:  (cpu_hotplug.dep_map){++++++}, at: [<ffffffff810a7877>] get_online_cpus+0x37/0x80
         #1:  (slab_mutex){+.+.+.}, at: [<ffffffff8120f691>] kmem_cache_destroy+0x41/0x2d0
      
        stack backtrace:
        CPU: 3 PID: 1211 Comm: rmmod Not tainted 4.10.0-test+ #48
        Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v02.05 05/07/2012
        Call Trace:
         print_circular_bug+0x1be/0x210
         __lock_acquire+0x10ed/0x1260
         lock_acquire+0xf6/0x1f0
         __kernfs_remove+0x254/0x320
         kernfs_remove+0x23/0x40
         sysfs_remove_dir+0x51/0x80
         kobject_del+0x18/0x50
         __kmem_cache_shutdown+0x3e6/0x460
         kmem_cache_destroy+0x1fb/0x2d0
         kvm_exit+0x2d/0x80 [kvm]
         vmx_exit+0x19/0xa1b [kvm_intel]
         SyS_delete_module+0x198/0x1f0
         ? SyS_delete_module+0x5/0x1f0
         entry_SYSCALL_64_fastpath+0x1f/0xc2
      
      It'd be the cleanest to deal with the issue by removing sysfs files
      without holding slab_mutex before the rest of shutdown; however, given
      the current code structure, it is pretty difficult to do so.
      
      This patch punts sysfs file removal to a work item.  Before commit
      bf5eb3de, the removal was punted to a RCU delayed work item which is
      executed after release.  Now, we're punting to a different work item on
      shutdown which still maintains the goal removing the sysfs files earlier
      when destroying kmem_caches.
      
      Link: http://lkml.kernel.org/r/20170620204512.GI21326@htj.duckdns.org
      
      
      Fixes: bf5eb3de ("slub: separate out sysfs_slab_release() from sysfs_slab_remove()")
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reported-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      Tested-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3b7b3140
    • Ilya Matveychikov's avatar
      lib/cmdline.c: fix get_options() overflow while parsing ranges · a91e0f68
      Ilya Matveychikov authored
      When using get_options() it's possible to specify a range of numbers,
      like 1-100500.  The problem is that it doesn't track array size while
      calling internally to get_range() which iterates over the range and
      fills the memory with numbers.
      
      Link: http://lkml.kernel.org/r/2613C75C-B04D-4BFF-82A6-12F97BA0F620@gmail.com
      
      
      Signed-off-by: default avatarIlya V. Matveychikov <matvejchikov@gmail.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a91e0f68
    • Jan Kara's avatar
      fs/dax.c: fix inefficiency in dax_writeback_mapping_range() · 1eb643d0
      Jan Kara authored
      dax_writeback_mapping_range() fails to update iteration index when
      searching radix tree for entries needing cache flushing.  Thus each
      pagevec worth of entries is searched starting from the start which is
      inefficient and prone to livelocks.  Update index properly.
      
      Link: http://lkml.kernel.org/r/20170619124531.21491-1-jack@suse.cz
      
      
      Fixes: 9973c98e ("dax: add support for fsync/sync")
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Reviewed-by: default avatarRoss Zwisler <ross.zwisler@linux.intel.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1eb643d0