1. 05 Jun, 2018 7 commits
    • Petr Mladek's avatar
      8bafa2a4
    • Petr Mladek's avatar
      bcf8677b
    • Sergey Senozhatsky's avatar
      printk: drop in_nmi check from printk_safe_flush_on_panic() · 554755be
      Sergey Senozhatsky authored
      Drop the in_nmi() check from printk_safe_flush_on_panic()
      and attempt to re-init (IOW unlock) locked logbuf spinlock
      from panic CPU regardless of its context.
      
      Otherwise, theoretically, we can deadlock on logbuf trying to flush
      per-CPU buffers:
      
        a) Panic CPU is running in non-NMI context
        b) Panic CPU sends out shutdown IPI via reboot vector
        c) Panic CPU fails to stop all remote CPUs
        d) Panic CPU sends out shutdown IPI via NMI vector
           One of the CPUs that we bring down via NMI vector can hold
           logbuf spin lock (theoretically).
      
      Link: http://lkml.kernel.org/r/20180530070350.10131-1-sergey.senozhatsky@gmail.com
      To: Steven Rostedt <rostedt@goodmis.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
      554755be
    • Geert Uytterhoeven's avatar
      lib/vsprintf: Remove atomic-unsafe support for %pCr · 666902e4
      Geert Uytterhoeven authored
      "%pCr" formats the current rate of a clock, and calls clk_get_rate().
      The latter obtains a mutex, hence it must not be called from atomic
      context.
      
      Remove support for this rarely-used format, as vsprintf() (and e.g.
      printk()) must be callable from any context.
      
      Any remaining out-of-tree users will start seeing the clock's name
      printed instead of its rate.
      Reported-by: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
      Fixes: 900cca29 ("lib/vsprintf: add %pC{,n,r} format specifiers for clocks")
      Link: http://lkml.kernel.org/r/1527845302-12159-5-git-send-email-geert+renesas@glider.be
      To: Jia-Ju Bai <baijiaju1990@gmail.com>
      To: Jonathan Corbet <corbet@lwn.net>
      To: Michael Turquette <mturquette@baylibre.com>
      To: Stephen Boyd <sboyd@kernel.org>
      To: Zhang Rui <rui.zhang@intel.com>
      To: Eduardo Valentin <edubezval@gmail.com>
      To: Eric Anholt <eric@anholt.net>
      To: Stefan Wahren <stefan.wahren@i2se.com>
      To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: linux-doc@vger.kernel.org
      Cc: linux-clk@vger.kernel.org
      Cc: linux-pm@vger.kernel.org
      Cc: linux-serial@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-renesas-soc@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Geert Uytterhoeven <geert+renesas@glider.be>
      Cc: stable@vger.kernel.org # 4.1+
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
      666902e4
    • Geert Uytterhoeven's avatar
      serial: sh-sci: Stop using printk format %pCr · d63c16f8
      Geert Uytterhoeven authored
      Printk format "%pCr" will be removed soon, as clk_get_rate() must not be
      called in atomic context.
      
      Replace it by open-coding the operation.  This is safe here, as the code
      runs in task context.
      
      Link: http://lkml.kernel.org/r/1527845302-12159-4-git-send-email-geert+renesas@glider.be
      To: Jia-Ju Bai <baijiaju1990@gmail.com>
      To: Jonathan Corbet <corbet@lwn.net>
      To: Michael Turquette <mturquette@baylibre.com>
      To: Stephen Boyd <sboyd@kernel.org>
      To: Zhang Rui <rui.zhang@intel.com>
      To: Eduardo Valentin <edubezval@gmail.com>
      To: Eric Anholt <eric@anholt.net>
      To: Stefan Wahren <stefan.wahren@i2se.com>
      To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: linux-doc@vger.kernel.org
      Cc: linux-clk@vger.kernel.org
      Cc: linux-pm@vger.kernel.org
      Cc: linux-serial@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-renesas-soc@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Geert Uytterhoeven <geert+renesas@glider.be>
      Cc: stable@vger.kernel.org # 4.5+
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
      d63c16f8
    • Geert Uytterhoeven's avatar
      thermal: bcm2835: Stop using printk format %pCr · bd2a07f7
      Geert Uytterhoeven authored
      Printk format "%pCr" will be removed soon, as clk_get_rate() must not be
      called in atomic context.
      
      Replace it by printing the variable that already holds the clock rate.
      Note that calling clk_get_rate() is safe here, as the code runs in task
      context.
      
      Link: http://lkml.kernel.org/r/1527845302-12159-3-git-send-email-geert+renesas@glider.be
      To: Jia-Ju Bai <baijiaju1990@gmail.com>
      To: Jonathan Corbet <corbet@lwn.net>
      To: Michael Turquette <mturquette@baylibre.com>
      To: Stephen Boyd <sboyd@kernel.org>
      To: Zhang Rui <rui.zhang@intel.com>
      To: Eduardo Valentin <edubezval@gmail.com>
      To: Eric Anholt <eric@anholt.net>
      To: Stefan Wahren <stefan.wahren@i2se.com>
      To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: linux-doc@vger.kernel.org
      Cc: linux-clk@vger.kernel.org
      Cc: linux-pm@vger.kernel.org
      Cc: linux-serial@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-renesas-soc@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: stable@vger.kernel.org # 4.12+
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Acked-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
      Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
      bd2a07f7
    • Geert Uytterhoeven's avatar
      clk: renesas: cpg-mssr: Stop using printk format %pCr · ef4b0be6
      Geert Uytterhoeven authored
      Printk format "%pCr" will be removed soon, as clk_get_rate() must not be
      called in atomic context.
      
      Replace it by open-coding the operation.  This is safe here, as the code
      runs in task context.
      
      Link: http://lkml.kernel.org/r/1527845302-12159-2-git-send-email-geert+renesas@glider.be
      To: Jia-Ju Bai <baijiaju1990@gmail.com>
      To: Jonathan Corbet <corbet@lwn.net>
      To: Michael Turquette <mturquette@baylibre.com>
      To: Stephen Boyd <sboyd@kernel.org>
      To: Zhang Rui <rui.zhang@intel.com>
      To: Eduardo Valentin <edubezval@gmail.com>
      To: Eric Anholt <eric@anholt.net>
      To: Stefan Wahren <stefan.wahren@i2se.com>
      To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: linux-doc@vger.kernel.org
      Cc: linux-clk@vger.kernel.org
      Cc: linux-pm@vger.kernel.org
      Cc: linux-serial@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-renesas-soc@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Geert Uytterhoeven <geert+renesas@glider.be>
      Cc: stable@vger.kernel.org # 4.5+
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Acked-by: default avatarStephen Boyd <sboyd@kernel.org>
      Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
      ef4b0be6
  2. 16 May, 2018 1 commit
  3. 25 Apr, 2018 1 commit
    • Sergey Senozhatsky's avatar
      printk: wake up klogd in vprintk_emit · 43a17111
      Sergey Senozhatsky authored
      We wake up klogd very late - only when current console_sem owner
      is done pushing pending kernel messages to the serial/net consoles.
      In some cases this results in lost syslog messages, because kernel
      log buffer is a circular buffer and if we don't wakeup syslog long
      enough there are chances that logbuf simply will wrap around.
      
      The patch moves the klogd wake up call to vprintk_emit(), which is
      the only legit way for a kernel message to appear in the logbuf,
      right after the attempt to handle consoles. As a result, klogd
      will get waken either after flushing the new message to consoles
      or immediately when consoles are still busy with older messages.
      
      Link: http://lkml.kernel.org/r/20180419014250.5692-1-sergey.senozhatsky@gmail.com
      To: Steven Rostedt <rostedt@goodmis.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
      43a17111
  4. 18 Apr, 2018 1 commit
  5. 11 Apr, 2018 8 commits
  6. 06 Apr, 2018 4 commits
    • Linus Torvalds's avatar
      Merge branch 'for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk · 357aa6ae
      Linus Torvalds authored
      Pull printk updates from Petr Mladek:
      
       - Add info about loaded kdump kernel into the dump stack header
      
       - Move dump-stack related code from printk.c to lib/dump_stack.c
      
       - Write message about suspending consoles in KERN_INFO log level
      
      * 'for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk:
        printk: change message to pr_info
        printk: move dump stack related code to lib/dump_stack.c
        print kdump kernel loaded status in stack dump
      357aa6ae
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · be88751f
      Linus Torvalds authored
      Pull misc filesystem updates from Jan Kara:
       "udf, ext2, quota, fsnotify fixes & cleanups:
      
         - udf fixes for handling of media without uid/gid
      
         - udf fixes for some corner cases in parsing of volume recognition
           sequence
      
         - improvements of fsnotify handling of ENOMEM
      
         - new ioctl to allow setting of watch descriptor id for inotify (for
           checkpoint - restart)
      
         - small ext2, reiserfs, quota cleanups"
      
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        quota: Kill an unused extern entry form quota.h
        reiserfs: Remove VLA from fs/reiserfs/reiserfs.h
        udf: fix potential refcnt problem of nls module
        ext2: change return code to -ENOMEM when failing memory allocation
        udf: Do not mark possibly inconsistent filesystems as closed
        fsnotify: Let userspace know about lost events due to ENOMEM
        fanotify: Avoid lost events due to ENOMEM for unlimited queues
        udf: Remove never implemented mount options
        udf: Update mount option documentation
        udf: Provide saner default for invalid uid / gid
        udf: Clean up handling of invalid uid/gid
        udf: Apply uid/gid mount options also to new inodes & chown
        udf: Ignore [ug]id=ignore mount options
        udf: Fix handling of Partition Descriptors
        udf: Unify common handling of descriptors
        udf: Convert descriptor index definitions to enum
        udf: Allow volume descriptor sequence to be terminated by unrecorded block
        udf: Simplify handling of Volume Descriptor Pointers
        udf: Fix off-by-one in volume descriptor sequence length
        inotify: Extend ioctl to allow to request id of new watch descriptor
      be88751f
    • Linus Torvalds's avatar
      Merge tag 'nfsd-4.17' of git://linux-nfs.org/~bfields/linux · 5e4d6597
      Linus Torvalds authored
      Pull nfsd updates from Bruce Fields:
       "Chuck Lever did a bunch of work on nfsd tracepoints, on RDMA, and on
        server xdr decoding (with an eye towards eliminating a data copy in
        the RDMA case).
      
        I did some refactoring of the delegation code in preparation for
        eliminating some delegation self-conflicts and implementing write
        delegations"
      
      * tag 'nfsd-4.17' of git://linux-nfs.org/~bfields/linux: (40 commits)
        nfsd: fix incorrect umasks
        sunrpc: remove incorrect HMAC request initialization
        NFSD: Clean up legacy NFS SYMLINK argument XDR decoders
        NFSD: Clean up legacy NFS WRITE argument XDR decoders
        nfsd: Trace NFSv4 COMPOUND execution
        nfsd: Add I/O trace points in the NFSv4 read proc
        nfsd: Add I/O trace points in the NFSv4 write path
        nfsd: Add "nfsd_" to trace point names
        nfsd: Record request byte count, not count of vectors
        nfsd: Fix NFSD trace points
        svc: Report xprt dequeue latency
        sunrpc: Report per-RPC execution stats
        sunrpc: Re-purpose trace_svc_process
        sunrpc: Save remote presentation address in svc_xprt for trace events
        sunrpc: Simplify trace_svc_recv
        sunrpc: Simplify do_enqueue tracing
        sunrpc: Move trace_svc_xprt_dequeue()
        sunrpc: Update show_svc_xprt_flags() to include recently added flags
        svc: Simplify ->xpo_secure_port
        sunrpc: Remove unneeded pointer dereference
        ...
      5e4d6597
    • Linus Torvalds's avatar
      Merge tag 'f2fs-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs · 274c0e74
      Linus Torvalds authored
      Pull f2fs update from Jaegeuk Kim:
       "In this round, we've mainly focused on performance tuning and critical
        bug fixes occurred in low-end devices. Sheng Yong introduced
        lost_found feature to keep missing files during recovery instead of
        thrashing them. We're preparing coming fsverity implementation. And,
        we've got more features to communicate with users for better
        performance. In low-end devices, some memory-related issues were
        fixed, and subtle race condtions and corner cases were addressed as
        well.
      
        Enhancements:
         - large nat bitmaps for more free node ids
         - add three block allocation policies to pass down write hints given by user
         - expose extension list to user and introduce hot file extension
         - tune small devices seamlessly for low-end devices
         - set readdir_ra by default
         - give more resources under gc_urgent mode regarding to discard and cleaning
         - introduce fsync_mode to enforce posix or not
         - nowait aio support
         - add lost_found feature to keep dangling inodes
         - reserve bits for future fsverity feature
         - add test_dummy_encryption for FBE
      
        Bug fixes:
         - don't use highmem for dentry pages
         - align memory boundary for bitops
         - truncate preallocated blocks in write errors
         - guarantee i_times on fsync call
         - clear CP_TRIMMED_FLAG correctly
         - prevent node chain loop during recovery
         - avoid data race between atomic write and background cleaning
         - avoid unnecessary selinux violation warnings on resgid option
         - GFP_NOFS to avoid deadlock in quota and read paths
         - fix f2fs_skip_inode_update to allow i_size recovery
      
        In addition to the above, there are several minor bug fixes and clean-ups"
      
      * tag 'f2fs-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (50 commits)
        f2fs: remain written times to update inode during fsync
        f2fs: make assignment of t->dentry_bitmap more readable
        f2fs: truncate preallocated blocks in error case
        f2fs: fix a wrong condition in f2fs_skip_inode_update
        f2fs: reserve bits for fs-verity
        f2fs: Add a segment type check in inplace write
        f2fs: no need to initialize zero value for GFP_F2FS_ZERO
        f2fs: don't track new nat entry in nat set
        f2fs: clean up with F2FS_BLK_ALIGN
        f2fs: check blkaddr more accuratly before issue a bio
        f2fs: Set GF_NOFS in read_cache_page_gfp while doing f2fs_quota_read
        f2fs: introduce a new mount option test_dummy_encryption
        f2fs: introduce F2FS_FEATURE_LOST_FOUND feature
        f2fs: release locks before return in f2fs_ioc_gc_range()
        f2fs: align memory boundary for bitops
        f2fs: remove unneeded set_cold_node()
        f2fs: add nowait aio support
        f2fs: wrap all options with f2fs_sb_info.mount_opt
        f2fs: Don't overwrite all types of node to keep node chain
        f2fs: introduce mount option for fsync mode
        ...
      274c0e74
  7. 05 Apr, 2018 18 commits
    • Linus Torvalds's avatar
      Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 052c220d
      Linus Torvalds authored
      Pull SCSI updates from James Bottomley:
       "This is mostly updates of the usual drivers: arcmsr, qla2xx, lpfc,
        ufs, mpt3sas, hisi_sas.
      
        In addition we have removed several really old drivers: sym53c416,
        NCR53c406a, fdomain, fdomain_cs and removed the old scsi_module.c
        initialization from all remaining drivers.
      
        Plus an assortment of bug fixes, initialization errors and other minor
        fixes"
      
      * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (168 commits)
        scsi: ufs: Add support for Auto-Hibernate Idle Timer
        scsi: ufs: sysfs: reworking of the rpm_lvl and spm_lvl entries
        scsi: qla2xxx: fx00 copypaste typo
        scsi: qla2xxx: fix error message on <qla2400
        scsi: smartpqi: update driver version
        scsi: smartpqi: workaround fw bug for oq deletion
        scsi: arcmsr: Change driver version to v1.40.00.05-20180309
        scsi: arcmsr: Sleep to avoid CPU stuck too long for waiting adapter ready
        scsi: arcmsr: Handle adapter removed due to thunderbolt cable disconnection.
        scsi: arcmsr: Rename ACB_F_BUS_HANG_ON to ACB_F_ADAPTER_REMOVED for adapter hot-plug
        scsi: qla2xxx: Update driver version to 10.00.00.06-k
        scsi: qla2xxx: Fix Async GPN_FT for FCP and FC-NVMe scan
        scsi: qla2xxx: Cleanup code to improve FC-NVMe error handling
        scsi: qla2xxx: Fix FC-NVMe IO abort during driver reset
        scsi: qla2xxx: Fix retry for PRLI RJT with reason of BUSY
        scsi: qla2xxx: Remove nvme_done_list
        scsi: qla2xxx: Return busy if rport going away
        scsi: qla2xxx: Fix n2n_ae flag to prevent dev_loss on PDB change
        scsi: qla2xxx: Add FC-NVMe abort processing
        scsi: qla2xxx: Add changes for devloss timeout in driver
        ...
      052c220d
    • Linus Torvalds's avatar
      Merge tag 'for-4.17/block-20180402' of git://git.kernel.dk/linux-block · 3526dd0c
      Linus Torvalds authored
      Pull block layer updates from Jens Axboe:
       "It's a pretty quiet round this time, which is nice. This contains:
      
         - series from Bart, cleaning up the way we set/test/clear atomic
           queue flags.
      
         - series from Bart, fixing races between gendisk and queue
           registration and removal.
      
         - set of bcache fixes and improvements from various folks, by way of
           Michael Lyle.
      
         - set of lightnvm updates from Matias, most of it being the 1.2 to
           2.0 transition.
      
         - removal of unused DIO flags from Nikolay.
      
         - blk-mq/sbitmap memory ordering fixes from Omar.
      
         - divide-by-zero fix for BFQ from Paolo.
      
         - minor documentation patches from Randy.
      
         - timeout fix from Tejun.
      
         - Alpha "can't write a char atomically" fix from Mikulas.
      
         - set of NVMe fixes by way of Keith.
      
         - bsg and bsg-lib improvements from Christoph.
      
         - a few sed-opal fixes from Jonas.
      
         - cdrom check-disk-change deadlock fix from Maurizio.
      
         - various little fixes, comment fixes, etc from various folks"
      
      * tag 'for-4.17/block-20180402' of git://git.kernel.dk/linux-block: (139 commits)
        blk-mq: Directly schedule q->timeout_work when aborting a request
        blktrace: fix comment in blktrace_api.h
        lightnvm: remove function name in strings
        lightnvm: pblk: remove some unnecessary NULL checks
        lightnvm: pblk: don't recover unwritten lines
        lightnvm: pblk: implement 2.0 support
        lightnvm: pblk: implement get log report chunk
        lightnvm: pblk: rename ppaf* to addrf*
        lightnvm: pblk: check for supported version
        lightnvm: implement get log report chunk helpers
        lightnvm: make address conversions depend on generic device
        lightnvm: add support for 2.0 address format
        lightnvm: normalize geometry nomenclature
        lightnvm: complete geo structure with maxoc*
        lightnvm: add shorten OCSSD version in geo
        lightnvm: add minor version to generic geometry
        lightnvm: simplify geometry structure
        lightnvm: pblk: refactor init/exit sequences
        lightnvm: Avoid validation of default op value
        lightnvm: centralize permission check for lightnvm ioctl
        ...
      3526dd0c
    • Linus Torvalds's avatar
      Merge tag 'edac_for_4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp · dd972f92
      Linus Torvalds authored
      Pull EDAC updates from Borislav Petkov:
       "Noteworthy is the NVDIMM support:
      
         - NVDIMM support to EDAC (Tony Luck)
      
         - misc fixes"
      
      * tag 'edac_for_4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
        EDAC, sb_edac: Remove variable length array usage
        EDAC, skx_edac: Detect non-volatile DIMMs
        firmware, DMI: Add function to look up a handle and return DIMM size
        acpi, nfit: Add function to look up nvdimm device and provide SMBIOS handle
        EDAC: Add new memory type for non-volatile DIMMs
        EDAC: Drop duplicated array of strings for memory type names
        EDAC, layerscape: Allow building for LS1021A
      dd972f92
    • Kees Cook's avatar
      kernel.h: Retain constant expression output for max()/min() · 3c8ba0d6
      Kees Cook authored
      In the effort to remove all VLAs from the kernel[1], it is desirable to
      build with -Wvla.  However, this warning is overly pessimistic, in that
      it is only happy with stack array sizes that are declared as constant
      expressions, and not constant values.  One case of this is the
      evaluation of the max() macro which, due to its construction, ends up
      converting constant expression arguments into a constant value result.
      
      All attempts to rewrite this macro with __builtin_constant_p() failed
      with older compilers (e.g.  gcc 4.4)[2].  However, Martin Uecker,
      constructed[3] a mind-shattering solution that works everywhere.
      Cthulhu fhtagn!
      
      This patch updates the min()/max() macros to evaluate to a constant
      expression when called on constant expression arguments.  This removes
      several false-positive stack VLA warnings from an x86 allmodconfig build
      when -Wvla is added:
      
        $ diff -u before.txt after.txt | grep ^-
        -drivers/input/touchscreen/cyttsp4_core.c:871:2: warning: ISO C90 forbids variable length array ‘ids’ [-Wvla]
        -fs/btrfs/tree-checker.c:344:4: warning: ISO C90 forbids variable length array ‘namebuf’ [-Wvla]
        -lib/vsprintf.c:747:2: warning: ISO C90 forbids variable length array ‘sym’ [-Wvla]
        -net/ipv4/proc.c:403:2: warning: ISO C90 forbids variable length array ‘buff’ [-Wvla]
        -net/ipv6/proc.c:198:2: warning: ISO C90 forbids variable length array ‘buff’ [-Wvla]
        -net/ipv6/proc.c:218:2: warning: ISO C90 forbids variable length array ‘buff64’ [-Wvla]
      
      This also updates two cases where different enums were being compared
      and explicitly casts them to int (which matches the old side-effect of
      the single-evaluation code): one in tpm/tpm_tis_core.h, and one in
      drm/drm_color_mgmt.c.
      
       [1] https://lkml.org/lkml/2018/3/7/621
       [2] https://lkml.org/lkml/2018/3/10/170
       [3] https://lkml.org/lkml/2018/3/20/845Co-Developed-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Co-Developed-by: default avatarMartin Uecker <Martin.Uecker@med.uni-goettingen.de>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Acked-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: default avatarMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3c8ba0d6
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 5414ab31
      Linus Torvalds authored
      Pull input updates from Dmitry Torokhov:
      
       - new driver for PhoenixRC Flight Controller Adapter
      
       - new driver for RAVE SP Power button
      
       - fixes for autosuspend-related deadlocks in a few unput USB dirvers
      
       - support for 2nd wheel in ATech PS/2 mouse
      
       - fix for ALPS trackpoint detection on Thinkpad L570 and Latitude 7370
      
       - bunch of cleanups in various in PS/2 protocols
      
       - other assorted changes and fixes
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (35 commits)
        Input: i8042 - enable MUX on Sony VAIO VGN-CS series to fix touchpad
        Input: stmfts, s6sy761 - update my e-mail
        Input: stmfts - use async probe & suspend/resume to avoid 2s delay
        Input: ALPS - fix TrackStick detection on Thinkpad L570 and Latitude 7370
        Input: xpad - add PDP device id 0x02a4
        Input: alps - report pressure of v3 and v7 trackstick
        Input: pxrc - new driver for PhoenixRC Flight Controller Adapter
        Input: usbtouchscreen - do not rely on input_dev->users
        Input: usbtouchscreen - fix deadlock in autosuspend
        Input: pegasus_notetaker - do not rely on input_dev->users
        Input: pagasus_notetaker - fix deadlock in autosuspend
        Input: synaptics_usb - do not rely on input_dev->users
        Input: synaptics_usb - fix deadlock in autosuspend
        Input: gpio-keys - add support for wakeup event action
        Input: appletouch - use true and false for boolean values
        Input: silead - add Chuwi Hi8 support
        Input: analog - use get_cycles() on PPC
        Input: stmpe-keypad - remove VLA usage
        Input: i8042 - add Lenovo ThinkPad L460 to i8042 reset list
        Input: add RAVE SP Powerbutton driver
        ...
      5414ab31
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial · 672a9c10
      Linus Torvalds authored
      Pull trivial tree updates from Jiri Kosina.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial:
        kfifo: fix inaccurate comment
        tools/thermal: tmon: fix for segfault
        net: Spelling s/stucture/structure/
        edd: don't spam log if no EDD information is present
        Documentation: Fix early-microcode.txt references after file rename
        tracing: Block comments should align the * on each line
        treewide: Fix typos in printk
        GenWQE: Fix a typo in two comments
        treewide: Align function definition open/close braces
      672a9c10
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid · e8403b49
      Linus Torvalds authored
      Pull HID updates from Jiri Kosina:
      
       - 3rd generation Wacom Intuos BT device support from Aaron Armstrong
         Skomra
      
       - support for NSG-MR5U and NSG-MR7U devices from Todd Kelner
      
       - multitouch Razer Blade Stealth support from Benjamin Tissoires
      
       - Elantech touchpad support from Alexandrov Stansilav
      
       - a few other scattered-around fixes and cleanups to drivers and
         generic code
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (31 commits)
        HID: google: Enable PM Full On mode when adjusting backlight
        HID: google: add google hammer HID driver
        HID: core: reset the quirks before calling probe again
        HID: multitouch: do not set HID_QUIRK_NO_INIT_REPORTS
        HID: core: remove the need for HID_QUIRK_NO_EMPTY_INPUT
        HID: use BIT() macro for quirks too
        HID: use BIT macro instead of plain integers for flags
        HID: multitouch: remove dead zones of Razer Blade Stealth
        HID: multitouch: export a quirk for the button handling of touchpads
        HID: usbhid: extend the polling interval configuration to keyboards
        HID: ntrig: document sysfs interface
        HID: wacom: wacom_wac_collection() is local to wacom_wac.c
        HID: wacom: generic: add the "Report Valid" usage
        HID: wacom: generic: Support multiple tools per report
        HID: wacom: Add support for 3rd generation Intuos BT
        HID: core: rewrite the hid-generic automatic unbind
        HID: sony: Add touchpad support for NSG-MR5U and NSG-MR7U remotes
        HID: hid-multitouch: Use true and false for boolean values
        HID: hid-ntrig: use true and false for boolean values
        HID: logitech-hidpp: document sysfs interface
        ...
      e8403b49
    • Linus Torvalds's avatar
      Merge tag 'sound-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · e02d37bf
      Linus Torvalds authored
      Pull sound updates from Takashi Iwai:
       "This became a large update. The changes are scattered widely, and the
        majority of them are attributed to ASoC componentization. The gitk
        output made me dizzy, but it's slightly better than London tube.
      
        OK, below are some highlights:
      
         - Continued hardening works in ALSA PCM core; most of the existing
           syzkaller reports should have been covered.
      
         - USB-audio got the initial USB Audio Class 3 support, as well as
           UAC2 jack detection support and more DSD-device support.
      
         - ASoC componentization: finally each individual driver was converted
           to components framework, which is more future-proof for further
           works. Most of conversations were systematic.
      
         - Lots of fixes for Intel Baytrail / Cherrytrail devices with Realtek
           codecs, typically tablets and small PCs.
      
         - Fixes / cleanups for Samsung Odroid systems
      
         - Cleanups in Freescale SSI driver
      
         - New ASoC drivers:
            * AKM AK4458 and AK5558 codecs
            * A few AMD based machine drivers
            * Intel Kabylake machine drivers
            * Maxim MAX9759 codec
            * Motorola CPCAP codec
            * Socionext Uniphier SoCs
            * TI PCM1789 and TDA7419 codecs
      
         - Retirement of Blackfin drivers along with architecture removal"
      
      * tag 'sound-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (497 commits)
        ALSA: pcm: Fix UAF at PCM release via PCM timer access
        ALSA: usb-audio: silence a static checker warning
        ASoC: tscs42xx: Remove owner assignment from i2c_driver
        ASoC: mediatek: remove "simple-mfd" in the example
        ASoC: cpcap: replace codec to component
        ASoC: Intel: bytcr_rt5651: don't use codec anymore
        ASoC: amd: don't use codec anymore
        ALSA: usb-audio: fix memory leak on cval
        ALSA: pcm: Fix mutex unbalance in OSS emulation ioctls
        ASoC: topology: Fix kcontrol name string handling
        ALSA: aloop: Mark paused device as inactive
        ALSA: usb-audio: update clock valid control
        ALSA: usb-audio: UAC2 jack detection
        ALSA: pcm: Return -EBUSY for OSS ioctls changing busy streams
        ALSA: pcm: Avoid potential races between OSS ioctls and read/write
        ALSA: usb-audio: Integrate native DSD support for ITF-USB based DACs.
        ALSA: usb-audio: FIX native DSD support for TEAC UD-501 DAC
        ALSA: usb-audio: Add native DSD support for Luxman DA-06
        ALSA: usb-audio: fix uac control query argument
        ASoC: nau8824: recover system clock when device changes
        ...
      e02d37bf
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-4.17' of git://git.infradead.org/users/hch/dma-mapping · 652ede37
      Linus Torvalds authored
      Pull dma-mapping updates from Christoph Hellwig:
       "Very light this round as the interesting dma mapping changes went
        through the x86 tree.
      
        This just provides proper stubs for architectures not supporting dma
        (Geert Uytterhoeven)"
      
      * tag 'dma-mapping-4.17' of git://git.infradead.org/users/hch/dma-mapping:
        usb: gadget: Add NO_DMA dummies for DMA mapping API
        scsi: Add NO_DMA dummies for SCSI DMA mapping API
        mm: Add NO_DMA dummies for DMA pool API
        dma-coherent: Add NO_DMA dummies for managed DMA API
        dma-mapping: Convert NO_DMA get_dma_ops() into a real dummy
      652ede37
    • Linus Torvalds's avatar
      Merge tag 'gpio-v4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · 1b2951dd
      Linus Torvalds authored
      Pull GPIO updates from Linus Walleij:
       "This is the bulk of GPIO changes for the v4.17 kernel cycle:
      
        New drivers:
      
         - Nintendo Wii GameCube GPIO, known as "Hollywood"
      
         - Raspberry Pi mailbox service GPIO expander
      
         - Spreadtrum main SC9860 SoC and IEC GPIO controllers.
      
        Improvements:
      
         - Implemented .get_multiple() callback for most of the
           high-performance industrial GPIO cards for the ISA bus.
      
         - ISA GPIO drivers now select the ISA_BUS_API instead of depending on
           it. This is merged with the same pattern for all the ISA drivers
           and some other Kconfig cleanups related to this.
      
        Cleanup:
      
         - Delete the TZ1090 GPIO drivers following the deletion of this SoC
           from the ARM tree.
      
         - Move the documentation over to driver-api to conform with the rest
           of the kernel documentation build.
      
         - Continue to make the GPIO drivers include only
           <linux/gpio/driver.h> and not the too broad <linux/gpio.h> that we
           want to get rid of.
      
         - Managed to remove VLA allocation from two drivers pending more
           fixes in this area for the next merge window.
      
         - Misc janitorial fixes"
      
      * tag 'gpio-v4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (77 commits)
        gpio: Add Spreadtrum PMIC EIC driver support
        gpio: Add Spreadtrum EIC driver support
        dt-bindings: gpio: Add Spreadtrum EIC controller documentation
        gpio: ath79: Fix potential NULL dereference in ath79_gpio_probe()
        pinctrl: qcom: Don't allow protected pins to be requested
        gpiolib: Support 'gpio-reserved-ranges' property
        gpiolib: Change bitmap allocation to kmalloc_array
        gpiolib: Extract mask allocation into subroutine
        dt-bindings: gpio: Add a gpio-reserved-ranges property
        gpio: mockup: fix a potential crash when creating debugfs entries
        gpio: pca953x: add compatibility for pcal6524 and pcal9555a
        gpio: dwapb: Add support for a bus clock
        gpio: Remove VLA from xra1403 driver
        gpio: Remove VLA from MAX3191X driver
        gpio: ws16c48: Implement get_multiple callback
        gpio: gpio-mm: Implement get_multiple callback
        gpio: 104-idi-48: Implement get_multiple callback
        gpio: 104-dio-48e: Implement get_multiple callback
        gpio: pcie-idio-24: Implement get_multiple/set_multiple callbacks
        gpio: pci-idio-16: Implement get_multiple callback
        ...
      1b2951dd
    • Jiri Kosina's avatar
      Merge branch 'for-4.17/wacom' into for-linus · 9931753b
      Jiri Kosina authored
      Pull support for 3rd generation Intuos BT device
      9931753b
    • Jiri Kosina's avatar
      Merge branch 'for-4.17/upstream' into for-linus · e2d39e0f
      Jiri Kosina authored
      Pull a few small generic code cleanups.
      e2d39e0f
    • Jiri Kosina's avatar
      Merge branch 'for-4.17/sony' into for-linus · 108ff0e8
      Jiri Kosina authored
      Pull support for NSG-MR5U and NSG-MR7U devices.
      108ff0e8
    • Jiri Kosina's avatar
      Merge branch 'for-4.17/multitouch' into for-linus · af73686e
      Jiri Kosina authored
      Pull Razer Blade Stealth support improvement and a few generic cleanups
      af73686e
    • Jiri Kosina's avatar
      Merge branch 'for-4.17/hid-i2c' into for-linus · f73fee74
      Jiri Kosina authored
      Small hid-i2c acpi cleanup.
      f73fee74
    • Jiri Kosina's avatar
      Merge branch 'for-4.17/hid-elan' into for-linus · 7a8c1c4e
      Jiri Kosina authored
      Pull new hid-elan driver, currently providing support for touchpad
      found in certain HP Pavilion x2 laptops.
      7a8c1c4e
    • Jiri Kosina's avatar
      Merge branch 'for-4.17/google-hammer' into for-linus · d463fd44
      Jiri Kosina authored
      Support for Google Hammer device.
      d463fd44
    • Jiri Kosina's avatar
      Merge branch 'for-4.17/elecom' into for-linus · a9ef00ae
      Jiri Kosina authored
      Support for new elecom device.
      a9ef00ae