1. 29 7月, 2018 1 次提交
  2. 28 7月, 2018 8 次提交
    • L
      Merge tag 'for-linus-20180727' of git://git.kernel.dk/linux-block · eb181a81
      Linus Torvalds 提交于
      Pull block fixes from Jens Axboe:
       "Bigger than usual at this time, mostly due to the O_DIRECT corruption
        issue and the fact that I was on vacation last week. This contains:
      
         - NVMe pull request with two fixes for the FC code, and two target
           fixes (Christoph)
      
         - a DIF bio reset iteration fix (Greg Edwards)
      
         - two nbd reply and requeue fixes (Josef)
      
         - SCSI timeout fixup (Keith)
      
         - a small series that fixes an issue with bio_iov_iter_get_pages(),
           which ended up causing corruption for larger sized O_DIRECT writes
           that ended up racing with buffered writes (Martin Wilck)"
      
      * tag 'for-linus-20180727' of git://git.kernel.dk/linux-block:
        block: reset bi_iter.bi_done after splitting bio
        block: bio_iov_iter_get_pages: pin more pages for multi-segment IOs
        blkdev: __blkdev_direct_IO_simple: fix leak in error case
        block: bio_iov_iter_get_pages: fix size of last iovec
        nvmet: only check for filebacking on -ENOTBLK
        nvmet: fixup crash on NULL device path
        scsi: set timed out out mq requests to complete
        blk-mq: export setting request completion state
        nvme: if_ready checks to fail io to deleting controller
        nvmet-fc: fix target sgl list on large transfers
        nbd: handle unexpected replies better
        nbd: don't requeue the same request twice.
      eb181a81
    • L
      Merge branch 'akpm' (patches from Andrew) · 864af0d4
      Linus Torvalds 提交于
      Merge misc fixes from Andrew Morton:
       "11 fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        kvm, mm: account shadow page tables to kmemcg
        zswap: re-check zswap_is_full() after do zswap_shrink()
        include/linux/eventfd.h: include linux/errno.h
        mm: fix vma_is_anonymous() false-positives
        mm: use vma_init() to initialize VMAs on stack and data segments
        mm: introduce vma_init()
        mm: fix exports that inadvertently make put_page() EXPORT_SYMBOL_GPL
        ipc/sem.c: prevent queue.status tearing in semop
        mm: disallow mappings that conflict for devm_memremap_pages()
        kasan: only select SLUB_DEBUG with SYSFS=y
        delayacct: fix crash in delayacct_blkio_end() after delayacct init failure
      864af0d4
    • L
      Merge tag 'pci-v4.18-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 1a3d8691
      Linus Torvalds 提交于
      Pull PCI fix from Bjorn Helgaas:
       "Fix a use-after-free error in fatal error recovery (Thomas Tai)"
      
      * tag 'pci-v4.18-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI/AER: Work around use-after-free in pcie_do_fatal_recovery()
      1a3d8691
    • L
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 6284c99c
      Linus Torvalds 提交于
      Pull arm64 fixes from Will Deacon:
       "Inevitably, after saying that I hoped we would be done on the fixes
        front, a couple of issues have cropped up over the last week. Next
        time I'll stay schtum.
      
        We've fixed an over-eager BUILD_BUG_ON() which Arnd ran into with
        arndconfig, as well as ensuring that KPTI really is disabled on
        Thunder-X1, where the cure is worse than the disease (this regressed
        when we reworked the heterogeneous CPU feature checking).
      
        Summary:
      
         - Fix disabling of kpti on Thunder-X machines
      
         - Fix premature BUILD_BUG_ON() found with randconfig"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: fix vmemmap BUILD_BUG_ON() triggering on !vmemmap setups
        arm64: Check for errata before evaluating cpu features
      6284c99c
    • L
      Merge tag 'drm-fixes-2018-07-27' of git://anongit.freedesktop.org/drm/drm · 3c9fdefe
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "Not much happening this week which is good: two imx display fixes and
        one i915 quirk addition"
      
      * tag 'drm-fixes-2018-07-27' of git://anongit.freedesktop.org/drm/drm:
        drm/i915/glk: Add Quirk for GLK NUC HDMI port issues.
        gpu: ipu-csi: Check for field type alternate
        drm/imx: imx-ldb: check if channel is enabled before printing warning
        drm/imx: imx-ldb: disable LDB on driver bind
      3c9fdefe
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 49b1622b
      Linus Torvalds 提交于
      Pull input fixes from Dmitry Torokhov:
      
       - a couple of new device IDs added to Elan i2c touchpad controller
         driver
      
       - another entry in i8042 reset quirk list
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: i8042 - add Lenovo LaVie Z to the i8042 reset list
        Input: elan_i2c - add another ACPI ID for Lenovo Ideapad 330-15AST
        MAINTAINERS: Add file patterns for serio device tree bindings
        Input: elan_i2c - add ACPI ID for lenovo ideapad 330
      49b1622b
    • L
      Merge tag 'trace-v4.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 3ebb6fb0
      Linus Torvalds 提交于
      Pull tracing fixes from Steven Rostedt:
       "Various fixes to the tracing infrastructure:
      
         - Fix double free when the reg() call fails in
           event_trigger_callback()
      
         - Fix anomoly of snapshot causing tracing_on flag to change
      
         - Add selftest to test snapshot and tracing_on affecting each other
      
         - Fix setting of tracepoint flag on error that prevents probes from
           being deleted.
      
         - Fix another possible double free that is similar to
           event_trigger_callback()
      
         - Quiet a gcc warning of a false positive unused variable
      
         - Fix crash of partial exposed task->comm to trace events"
      
      * tag 'trace-v4.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        kthread, tracing: Don't expose half-written comm when creating kthreads
        tracing: Quiet gcc warning about maybe unused link variable
        tracing: Fix possible double free in event_enable_trigger_func()
        tracing/kprobes: Fix trace_probe flags on enable_trace_kprobe() failure
        selftests/ftrace: Add snapshot and tracing_on test case
        ring_buffer: tracing: Inherit the tracing setting to next ring buffer
        tracing: Fix double free of event_trigger_data
      3ebb6fb0
    • L
      Merge tag 'xfs-4.18-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · f636d300
      Linus Torvalds 提交于
      Pull xfs fixes from Darrick Wong:
      
       - Fix some uninitialized variable errors
      
       - Fix an incorrect check in metadata verifiers
      
      * tag 'xfs-4.18-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: properly handle free inodes in extent hint validators
        xfs: Initialize variables in xfs_alloc_get_rec before using them
      f636d300
  3. 27 7月, 2018 24 次提交
  4. 26 7月, 2018 6 次提交
    • S
      kthread, tracing: Don't expose half-written comm when creating kthreads · 3e536e22
      Snild Dolkow 提交于
      There is a window for racing when printing directly to task->comm,
      allowing other threads to see a non-terminated string. The vsnprintf
      function fills the buffer, counts the truncated chars, then finally
      writes the \0 at the end.
      
      	creator                     other
      	vsnprintf:
      	  fill (not terminated)
      	  count the rest            trace_sched_waking(p):
      	  ...                         memcpy(comm, p->comm, TASK_COMM_LEN)
      	  write \0
      
      The consequences depend on how 'other' uses the string. In our case,
      it was copied into the tracing system's saved cmdlines, a buffer of
      adjacent TASK_COMM_LEN-byte buffers (note the 'n' where 0 should be):
      
      	crash-arm64> x/1024s savedcmd->saved_cmdlines | grep 'evenk'
      	0xffffffd5b3818640:     "irq/497-pwr_evenkworker/u16:12"
      
      ...and a strcpy out of there would cause stack corruption:
      
      	[224761.522292] Kernel panic - not syncing: stack-protector:
      	    Kernel stack is corrupted in: ffffff9bf9783c78
      
      	crash-arm64> kbt | grep 'comm\|trace_print_context'
      	#6  0xffffff9bf9783c78 in trace_print_context+0x18c(+396)
      	      comm (char [16]) =  "irq/497-pwr_even"
      
      	crash-arm64> rd 0xffffffd4d0e17d14 8
      	ffffffd4d0e17d14:  2f71726900000000 5f7277702d373934   ....irq/497-pwr_
      	ffffffd4d0e17d24:  726f776b6e657665 3a3631752f72656b   evenkworker/u16:
      	ffffffd4d0e17d34:  f9780248ff003231 cede60e0ffffff9b   12..H.x......`..
      	ffffffd4d0e17d44:  cede60c8ffffffd4 00000fffffffffd4   .....`..........
      
      The workaround in e09e2867 (use strlcpy in __trace_find_cmdline) was
      likely needed because of this same bug.
      
      Solved by vsnprintf:ing to a local buffer, then using set_task_comm().
      This way, there won't be a window where comm is not terminated.
      
      Link: http://lkml.kernel.org/r/20180726071539.188015-1-snild@sony.com
      
      Cc: stable@vger.kernel.org
      Fixes: bc0c38d1 ("ftrace: latency tracer infrastructure")
      Reviewed-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      Signed-off-by: NSnild Dolkow <snild@sony.com>
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      3e536e22
    • S
      tracing: Quiet gcc warning about maybe unused link variable · 2519c1bb
      Steven Rostedt (VMware) 提交于
      Commit 57ea2a34 ("tracing/kprobes: Fix trace_probe flags on
      enable_trace_kprobe() failure") added an if statement that depends on another
      if statement that gcc doesn't see will initialize the "link" variable and
      gives the warning:
      
       "warning: 'link' may be used uninitialized in this function"
      
      It is really a false positive, but to quiet the warning, and also to make
      sure that it never actually is used uninitialized, initialize the "link"
      variable to NULL and add an if (!WARN_ON_ONCE(!link)) where the compiler
      thinks it could be used uninitialized.
      
      Cc: stable@vger.kernel.org
      Fixes: 57ea2a34 ("tracing/kprobes: Fix trace_probe flags on enable_trace_kprobe() failure")
      Reported-by: Nkbuild test robot <lkp@intel.com>
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      2519c1bb
    • S
      tracing: Fix possible double free in event_enable_trigger_func() · 15cc7864
      Steven Rostedt (VMware) 提交于
      There was a case that triggered a double free in event_trigger_callback()
      due to the called reg() function freeing the trigger_data and then it
      getting freed again by the error return by the caller. The solution there
      was to up the trigger_data ref count.
      
      Code inspection found that event_enable_trigger_func() has the same issue,
      but is not as easy to trigger (requires harder to trigger failures). It
      needs to be solved slightly different as it needs more to clean up when the
      reg() function fails.
      
      Link: http://lkml.kernel.org/r/20180725124008.7008e586@gandalf.local.home
      
      Cc: stable@vger.kernel.org
      Fixes: 7862ad18 ("tracing: Add 'enable_event' and 'disable_event' event trigger commands")
      Reivewed-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      15cc7864
    • C
      drm/i915/glk: Add Quirk for GLK NUC HDMI port issues. · 0ca94881
      Clint Taylor 提交于
      On GLK NUC platforms the HDMI retiming buffer needs additional disabled
      time to correctly sync to a faster incoming signal.
      
      When measured on a scope the highspeed lines of the HDMI clock turn off
       for ~400uS during a normal resolution change. The HDMI retimer on the
       GLK NUC appears to require at least a full frame of quiet time before a
      new faster clock can be correctly sync'd. Wait 100ms due to msleep
      inaccuracies while waiting for a completed frame. Add a quirk to the
      driver for GLK boards that use ITE66317 HDMI retimers.
      
      V2: Add more devices to the quirk list
      V3: Delay increased to 100ms, check to confirm crtc type is HDMI.
      V4: crtc type check extended to include _DDI and whitespace fixes
      v5: Fix white spaces, remove the macro for delay. Revert the crtc type
          check introduced in v4.
      
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: <stable@vger.kernel.org> # v4.14+
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105887Signed-off-by: NClint Taylor <clinton.a.taylor@intel.com>
      Tested-by: NDaniel Scheller <d.scheller.oss@gmail.com>
      Signed-off-by: NRadhakrishna Sripada <radhakrishna.sripada@intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180710200205.1478-1-radhakrishna.sripada@intel.com
      (cherry picked from commit 90c3e219)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      0ca94881
    • L
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 6e77b267
      Linus Torvalds 提交于
      Pull clk fixes from Stephen Boyd:
       "One more round of updates for problems seen this -rc series. Drivers
        fixes are:
      
         - Amlogic Meson audio divider fix and CPU clk critical marking
      
         - Qualcomm multimedia GDSC marked as 'always on' to keep display
           working
      
         - Aspeed fixes for critical clks, resets causing clks to stay
           disabled, and an incorrect HPLL frequency calculation
      
         - Marvell Armada 3700 cpu clks would undervolt when switching from
           low frequencies to high frequencies because the voltage didn't
           stabilize in time so now we switch to an intermediate frequency
      
        Plus we have a core framework thinko that messed up the debugfs flag
        printing logic to make it not very useful"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: aspeed: Support HPLL strapping on ast2400
        clk: mvebu: armada-37xx-periph: Fix switching CPU rate from 300Mhz to 1.2GHz
        clk: aspeed: Mark bclk (PCIe) and dclk (VGA) as critical
        clk/mmcc-msm8996: Make mmagic_bimc_gdsc ALWAYS_ON
        clk: aspeed: Treat a gate in reset as disabled
        clk: Really show symbolic clock flags in debugfs
        clk: qcom: gcc-msm8996: Disable halt check on UFS tx clock
        clk: meson: audio-divider is one based
        clk: meson-gxbb: set fclk_div2 as CLK_IS_CRITICAL
      6e77b267
    • L
      Merge tag 'fscache-fixes-20180725' of... · 5c61ef1b
      Linus Torvalds 提交于
      Merge tag 'fscache-fixes-20180725' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
      
      Pull fscache/cachefiles fixes from David Howells:
      
       - Allow cancelled operations to be queued so they can be cleaned up.
      
       - Fix a refcounting bug in the monitoring of reads on backend files
         whereby a race can occur between monitor objects being listed for
         work, the work processing being queued and the work processor running
         and destroying the monitor objects.
      
       - Fix a ref overput in object attachment, whereby a tentatively
         considered object is put in error handling without first being 'got'.
      
       - Fix a missing clear of the CACHEFILES_OBJECT_ACTIVE flag whereby an
         assertion occurs when we retry because it seems the object is now
         active.
      
       - Wait rather BUG'ing on an object collision in the depths of
         cachefiles as the active object should be being cleaned up - also
         depends on the one above.
      
      * tag 'fscache-fixes-20180725' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
        cachefiles: Wait rather than BUG'ing on "Unexpected object collision"
        cachefiles: Fix missing clear of the CACHEFILES_OBJECT_ACTIVE flag
        fscache: Fix reference overput in fscache_attach_object() error handling
        cachefiles: Fix refcounting bug in backing-file read monitoring
        fscache: Allow cancelled operations to be enqueued
      5c61ef1b
  5. 25 7月, 2018 1 次提交