1. 10 3月, 2020 1 次提交
  2. 28 2月, 2020 3 次提交
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid · 278de45e
      Linus Torvalds 提交于
      Pull HID subsystem fixes from Jiri Kosina:
      
       - syzkaller-reported error handling fixes in various drivers, from
         various people
      
       - increase of HID report buffer size to 8K, which is apparently needed
         by certain modern devices
      
       - a few new device-ID-specific fixes / quirks
      
       - battery charging status reporting fix in logitech-hidpp, from Filipe
         Laíns
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
        HID: hid-bigbenff: fix race condition for scheduled work during removal
        HID: hid-bigbenff: call hid_hw_stop() in case of error
        HID: hid-bigbenff: fix general protection fault caused by double kfree
        HID: i2c-hid: add Trekstor Surfbook E11B to descriptor override
        HID: alps: Fix an error handling path in 'alps_input_configured()'
        HID: hiddev: Fix race in in hiddev_disconnect()
        HID: core: increase HID report buffer size to 8KiB
        HID: core: fix off-by-one memset in hid_report_raw_event()
        HID: apple: Add support for recent firmware on Magic Keyboards
        HID: ite: Only bind to keyboard USB interface on Acer SW5-012 keyboard dock
        HID: logitech-hidpp: BatteryVoltage: only read chargeStatus if extPower is active
      278de45e
    • L
      Merge tag 'docs-5.6-fixes' of git://git.lwn.net/linux · e46bfaba
      Linus Torvalds 提交于
      Pull documentation fixes from Jonathan Corbet:
       "A pair of docs-build fixes"
      
      * tag 'docs-5.6-fixes' of git://git.lwn.net/linux:
        docs: Fix empty parallelism argument
        docs: remove MPX from the x86 toc
      e46bfaba
    • L
      Merge tag 'audit-pr-20200226' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit · ed5fa559
      Linus Torvalds 提交于
      Pull audit fixes from Paul Moore:
       "Two fixes for problems found by syzbot:
      
         - Moving audit filter structure fields into a union caused some
           problems in the code which populates that filter structure.
      
           We keep the union (that idea is a good one), but we are fixing the
           code so that it doesn't needlessly set fields in the union and mess
           up the error handling.
      
         - The audit_receive_msg() function wasn't validating user input as
           well as it should in all cases, we add the necessary checks"
      
      * tag 'audit-pr-20200226' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit:
        audit: always check the netlink payload length in audit_receive_msg()
        audit: fix error handling in audit_data_to_entry()
      ed5fa559
  3. 27 2月, 2020 6 次提交
    • L
      Merge tag 'tag-chrome-platform-fixes-for-v5.6-rc4' of... · bfdc6d91
      Linus Torvalds 提交于
      Merge tag 'tag-chrome-platform-fixes-for-v5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux
      
      Pull chrome platform fix from Benson Leung:
       "Fix a build warning"
      
      * tag 'tag-chrome-platform-fixes-for-v5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
        platform/chrome: wilco_ec: Include asm/unaligned instead of linux/ path
      bfdc6d91
    • L
      Merge tag 'trace-v5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 91ad64a8
      Linus Torvalds 提交于
      Pull tracing and bootconfig updates:
       "Fixes and changes to bootconfig before it goes live in a release.
      
        Change in API of bootconfig (before it comes live in a release):
        - Have a magic value "BOOTCONFIG" in initrd to know a bootconfig
          exists
        - Set CONFIG_BOOT_CONFIG to 'n' by default
        - Show error if "bootconfig" on cmdline but not compiled in
        - Prevent redefining the same value
        - Have a way to append values
        - Added a SELECT BLK_DEV_INITRD to fix a build failure
      
        Synthetic event fixes:
        - Switch to raw_smp_processor_id() for recording CPU value in preempt
          section. (No care for what the value actually is)
        - Fix samples always recording u64 values
        - Fix endianess
        - Check number of values matches number of fields
        - Fix a printing bug
      
        Fix of trace_printk() breaking postponed start up tests
      
        Make a function static that is only used in a single file"
      
      * tag 'trace-v5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        bootconfig: Fix CONFIG_BOOTTIME_TRACING dependency issue
        bootconfig: Add append value operator support
        bootconfig: Prohibit re-defining value on same key
        bootconfig: Print array as multiple commands for legacy command line
        bootconfig: Reject subkey and value on same parent key
        tools/bootconfig: Remove unneeded error message silencer
        bootconfig: Add bootconfig magic word for indicating bootconfig explicitly
        bootconfig: Set CONFIG_BOOT_CONFIG=n by default
        tracing: Clear trace_state when starting trace
        bootconfig: Mark boot_config_checksum() static
        tracing: Disable trace_printk() on post poned tests
        tracing: Have synthetic event test use raw_smp_processor_id()
        tracing: Fix number printing bug in print_synth_event()
        tracing: Check that number of vals matches number of synth event fields
        tracing: Make synth_event trace functions endian-correct
        tracing: Make sure synth_event_trace() example always uses u64
      91ad64a8
    • L
      Merge tag 'linux-kselftest-kunit-5.6-rc4' of... · b98cce1e
      Linus Torvalds 提交于
      Merge tag 'linux-kselftest-kunit-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull Kunit fixes from Shuah Khan:
       "This Kselftest kunit update consists of fixes to documentation and
        the run-time tool from Brendan Higgins and Heidi Fahim"
      
      * tag 'linux-kselftest-kunit-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        kunit: run kunit_tool from any directory
        kunit: test: Improve error messages for kunit_tool when kunitconfig is invalid
        Documentation: kunit: fixed sphinx error in code block
      b98cce1e
    • L
      Merge tag 'linux-kselftest-5.6-rc4' of... · 2fcc7417
      Linus Torvalds 提交于
      Merge tag 'linux-kselftest-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull Kselftest fixes from Shuah Khan:
      
       - fixes to TIMEOUT failures and out-of-tree compilation compilation
         errors from Michael Ellerman.
      
       - declutter git status fix from Christophe Leroy
      
      * tag 'linux-kselftest-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests/rseq: Fix out-of-tree compilation
        selftests: Install settings files to fix TIMEOUT failures
        selftest/lkdtm: Don't pollute 'git status'
      2fcc7417
    • C
      Revert "KVM: x86: enable -Werror" · cfe2ce49
      Christoph Hellwig 提交于
      This reverts commit ead68df9.
      
      Using the -Werror flag breaks the build for me due to mostly harmless
      KASAN or similar warnings:
      
        arch/x86/kvm/x86.c: In function ‘kvm_timer_init’:
        arch/x86/kvm/x86.c:7209:1: error: the frame size of 1112 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
      
      Feel free to add a CONFIG_WERROR if you care strong enough, but don't
      break peoples builds for absolutely no good reason.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cfe2ce49
    • L
      signal: avoid double atomic counter increments for user accounting · fda31c50
      Linus Torvalds 提交于
      When queueing a signal, we increment both the users count of pending
      signals (for RLIMIT_SIGPENDING tracking) and we increment the refcount
      of the user struct itself (because we keep a reference to the user in
      the signal structure in order to correctly account for it when freeing).
      
      That turns out to be fairly expensive, because both of them are atomic
      updates, and particularly under extreme signal handling pressure on big
      machines, you can get a lot of cache contention on the user struct.
      That can then cause horrid cacheline ping-pong when you do these
      multiple accesses.
      
      So change the reference counting to only pin the user for the _first_
      pending signal, and to unpin it when the last pending signal is
      dequeued.  That means that when a user sees a lot of concurrent signal
      queuing - which is the only situation when this matters - the only
      atomic access needed is generally the 'sigpending' count update.
      
      This was noticed because of a particularly odd timing artifact on a
      dual-socket 96C/192T Cascade Lake platform: when you get into bad
      contention, on that machine for some reason seems to be much worse when
      the contention happens in the upper 32-byte half of the cacheline.
      
      As a result, the kernel test robot will-it-scale 'signal1' benchmark had
      an odd performance regression simply due to random alignment of the
      'struct user_struct' (and pointed to a completely unrelated and
      apparently nonsensical commit for the regression).
      
      Avoiding the double increments (and decrements on the dequeueing side,
      of course) makes for much less contention and hugely improved
      performance on that will-it-scale microbenchmark.
      
      Quoting Feng Tang:
      
       "It makes a big difference, that the performance score is tripled! bump
        from original 17000 to 54000. Also the gap between 5.0-rc6 and
        5.0-rc6+Jiri's patch is reduced to around 2%"
      
      [ The "2% gap" is the odd cacheline placement difference on that
        platform: under the extreme contention case, the effect of which half
        of the cacheline was hot was 5%, so with the reduced contention the
        odd timing artifact is reduced too ]
      
      It does help in the non-contended case too, but is not nearly as
      noticeable.
      Reported-and-tested-by: NFeng Tang <feng.tang@intel.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Huang, Ying <ying.huang@intel.com>
      Cc: Philip Li <philip.li@intel.com>
      Cc: Andi Kleen <andi.kleen@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fda31c50
  4. 26 2月, 2020 3 次提交
    • M
      bootconfig: Fix CONFIG_BOOTTIME_TRACING dependency issue · 2910b5aa
      Masami Hiramatsu 提交于
      Since commit d8a953dd ("bootconfig: Set CONFIG_BOOT_CONFIG=n by
      default") also changed the CONFIG_BOOTTIME_TRACING to select
      CONFIG_BOOT_CONFIG to show the boot-time tracing on the menu,
      it introduced wrong dependencies with BLK_DEV_INITRD as below.
      
      WARNING: unmet direct dependencies detected for BOOT_CONFIG
        Depends on [n]: BLK_DEV_INITRD [=n]
        Selected by [y]:
        - BOOTTIME_TRACING [=y] && TRACING_SUPPORT [=y] && FTRACE [=y] && TRACING [=y]
      
      This makes the CONFIG_BOOT_CONFIG selects CONFIG_BLK_DEV_INITRD to
      fix this error and make CONFIG_BOOTTIME_TRACING=n by default, so
      that both boot-time tracing and boot configuration off but those
      appear on the menu list.
      
      Link: http://lkml.kernel.org/r/158264140162.23842.11237423518607465535.stgit@devnote2
      
      Fixes: d8a953dd ("bootconfig: Set CONFIG_BOOT_CONFIG=n by default")
      Reported-by: NRandy Dunlap <rdunlap@infradead.org>
      Compiled-tested-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      2910b5aa
    • L
      Merge tag 'riscv-for-linux-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · c5f86891
      Linus Torvalds 提交于
      Pull RISC-V fixes from Palmer Dabbelt:
       "This contains a handful of RISC-V related fixes that I've collected
        and would like to target for 5.6-rc4:
      
         - A fix to set up the PMPs on boot, which allows the kernel to access
           memory on systems that don't set up permissive PMPs before getting
           to Linux. This only effects machine-mode kernels, which currently
           means only NOMMU kernels.
      
         - A fix to avoid enabling supervisor-mode interrupts when running in
           machine-mode, also only for NOMMU kernels.
      
         - A pair of fixes to our KASAN support to avoid corrupting memory.
      
         - A gitignore fix.
      
        This boots on QEMU's virt board for me"
      
      * tag 'riscv-for-linux-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: adjust the indent
        riscv: allocate a complete page size for each page table
        riscv: Fix gitignore
        RISC-V: Don't enable all interrupts in trap_init()
        riscv: set pmp configuration if kernel is running in M-mode
      c5f86891
    • L
      Merge branch 'mips-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · d67f250e
      Linus Torvalds 提交于
      Pull MIPS fixes from Paul Burton:
       "Here are a few MIPS fixes, and a MAINTAINERS update to hand over MIPS
        maintenance to Thomas Bogendoerfer - this will be my final pull
        request as MIPS maintainer.
      
        Thanks for your helpful comments, useful corrections & responsiveness
        during the time I've fulfilled the role, and I'm sure I'll pop up
        elsewhere in the tree somewhere down the line"
      
      * 'mips-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MAINTAINERS: Hand MIPS over to Thomas
        MIPS: ingenic: DTS: Fix watchdog nodes
        MIPS: X1000: Fix clock of watchdog node.
        MIPS: vdso: Wrap -mexplicit-relocs in cc-option
        MIPS: VPE: Fix a double free and a memory leak in 'release_vpe()'
        MIPS: cavium_octeon: Fix syncw generation.
        mips: vdso: add build time check that no 'jalr t9' calls left
        MIPS: Disable VDSO time functionality on microMIPS
        mips: vdso: fix 'jalr t9' crash in vdso code
      d67f250e
  5. 25 2月, 2020 11 次提交
  6. 24 2月, 2020 4 次提交
    • L
      Linux 5.6-rc3 · f8788d86
      Linus Torvalds 提交于
      f8788d86
    • L
      Merge tag 'for-5.6-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · d2eee258
      Linus Torvalds 提交于
      Pull btrfs fixes from David Sterba:
       "These are fixes that were found during testing with help of error
        injection, plus some other stable material.
      
        There's a fixup to patch added to rc1 causing locking in wrong context
        warnings, tests found one more deadlock scenario. The patches are
        tagged for stable, two of them now in the queue but we'd like all
        three released at the same time.
      
        I'm not happy about fixes to fixes in such a fast succession during
        rcs, but I hope we found all the fallouts of commit 28553fa9
        ('Btrfs: fix race between shrinking truncate and fiemap')"
      
      * tag 'for-5.6-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        Btrfs: fix deadlock during fast fsync when logging prealloc extents beyond eof
        Btrfs: fix btrfs_wait_ordered_range() so that it waits for all ordered extents
        btrfs: fix bytes_may_use underflow in prealloc error condtition
        btrfs: handle logged extent failure properly
        btrfs: do not check delayed items are empty for single transaction cleanup
        btrfs: reset fs_root to NULL on error in open_ctree
        btrfs: destroy qgroup extent records on transaction abort
      d2eee258
    • L
      Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · a3163ca0
      Linus Torvalds 提交于
      Pull ext4 fixes from Ted Ts'o:
       "More miscellaneous ext4 bug fixes (all stable fodder)"
      
      * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: fix mount failure with quota configured as module
        jbd2: fix ocfs2 corrupt when clearing block group bits
        ext4: fix race between writepages and enabling EXT4_EXTENTS_FL
        ext4: rename s_journal_flag_rwsem to s_writepages_rwsem
        ext4: fix potential race between s_flex_groups online resizing and access
        ext4: fix potential race between s_group_info online resizing and access
        ext4: fix potential race between online resizing and write operations
        ext4: add cond_resched() to __ext4_find_entry()
        ext4: fix a data race in EXT4_I(inode)->i_disksize
      a3163ca0
    • L
      Merge tag 'csky-for-linus-5.6-rc3' of git://github.com/c-sky/csky-linux · c6188dff
      Linus Torvalds 提交于
      Pull csky updates from Guo Ren:
       "Sorry, I missed 5.6-rc1 merge window, but in this pull request the
        most are the fixes and the rests are between fixes and features. The
        only outside modification is the MAINTAINERS file update with our
        mailing list.
      
         - cache flush implementation fixes
      
         - ftrace modify panic fix
      
         - CONFIG_SMP boot problem fix
      
         - fix pt_regs saving for atomic.S
      
         - fix fixaddr_init without highmem.
      
         - fix stack protector support
      
         - fix fake Tightly-Coupled Memory code compile and use
      
         - fix some typos and coding convention"
      
      * tag 'csky-for-linus-5.6-rc3' of git://github.com/c-sky/csky-linux: (23 commits)
        csky: Replace <linux/clk-provider.h> by <linux/of_clk.h>
        csky: Implement copy_thread_tls
        csky: Add PCI support
        csky: Minimize defconfig to support buildroot config.fragment
        csky: Add setup_initrd check code
        csky: Cleanup old Kconfig options
        arch/csky: fix some Kconfig typos
        csky: Fixup compile warning for three unimplemented syscalls
        csky: Remove unused cache implementation
        csky: Fixup ftrace modify panic
        csky: Add flush_icache_mm to defer flush icache all
        csky: Optimize abiv2 copy_to_user_page with VM_EXEC
        csky: Enable defer flush_dcache_page for abiv2 cpus (807/810/860)
        csky: Remove unnecessary flush_icache_* implementation
        csky: Support icache flush without specific instructions
        csky/Kconfig: Add Kconfig.platforms to support some drivers
        csky/smp: Fixup boot failed when CONFIG_SMP
        csky: Set regs->usp to kernel sp, when the exception is from kernel
        csky/mm: Fixup export invalid_pte_table symbol
        csky: Separate fixaddr_init from highmem
        ...
      c6188dff
  7. 23 2月, 2020 12 次提交
    • O
      KVM: nVMX: Check IO instruction VM-exit conditions · 35a57134
      Oliver Upton 提交于
      Consult the 'unconditional IO exiting' and 'use IO bitmaps' VM-execution
      controls when checking instruction interception. If the 'use IO bitmaps'
      VM-execution control is 1, check the instruction access against the IO
      bitmaps to determine if the instruction causes a VM-exit.
      Signed-off-by: NOliver Upton <oupton@google.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      35a57134
    • O
      KVM: nVMX: Refactor IO bitmap checks into helper function · e71237d3
      Oliver Upton 提交于
      Checks against the IO bitmap are useful for both instruction emulation
      and VM-exit reflection. Refactor the IO bitmap checks into a helper
      function.
      Signed-off-by: NOliver Upton <oupton@google.com>
      Reviewed-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      e71237d3
    • P
      KVM: nVMX: Don't emulate instructions in guest mode · 07721fee
      Paolo Bonzini 提交于
      vmx_check_intercept is not yet fully implemented. To avoid emulating
      instructions disallowed by the L1 hypervisor, refuse to emulate
      instructions by default.
      
      Cc: stable@vger.kernel.org
      [Made commit, added commit msg - Oliver]
      Signed-off-by: NOliver Upton <oupton@google.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      07721fee
    • O
      KVM: nVMX: Emulate MTF when performing instruction emulation · 5ef8acbd
      Oliver Upton 提交于
      Since commit 5f3d45e7 ("kvm/x86: add support for
      MONITOR_TRAP_FLAG"), KVM has allowed an L1 guest to use the monitor trap
      flag processor-based execution control for its L2 guest. KVM simply
      forwards any MTF VM-exits to the L1 guest, which works for normal
      instruction execution.
      
      However, when KVM needs to emulate an instruction on the behalf of an L2
      guest, the monitor trap flag is not emulated. Add the necessary logic to
      kvm_skip_emulated_instruction() to synthesize an MTF VM-exit to L1 upon
      instruction emulation for L2.
      
      Fixes: 5f3d45e7 ("kvm/x86: add support for MONITOR_TRAP_FLAG")
      Signed-off-by: NOliver Upton <oupton@google.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      5ef8acbd
    • L
      KVM: fix error handling in svm_hardware_setup · dd58f3c9
      Li RongQing 提交于
      rename svm_hardware_unsetup as svm_hardware_teardown, move
      it before svm_hardware_setup, and call it to free all memory
      if fail to setup in svm_hardware_setup, otherwise memory will
      be leaked
      
      remove __exit attribute for it since it is called in __init
      function
      Signed-off-by: NLi RongQing <lirongqing@baidu.com>
      Reviewed-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      dd58f3c9
    • G
      csky: Replace <linux/clk-provider.h> by <linux/of_clk.h> · 99db590b
      Geert Uytterhoeven 提交于
      The C-Sky platform code is not a clock provider, and just needs to call
      of_clk_init().
      
      Hence it can include <linux/of_clk.h> instead of <linux/clk-provider.h>.
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NGuo Ren <guoren@linux.alibaba.com>
      99db590b
    • L
      Merge tag 'ras-urgent-2020-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · dca132a6
      Linus Torvalds 提交于
      Pull RAS fixes from Thomas Gleixner:
       "Two fixes for the AMD MCE driver:
      
         - Populate the per CPU MCA bank descriptor pointer only after it has
           been completely set up to prevent a use-after-free in case that one
           of the subsequent initialization step fails
      
         - Implement a proper release function for the sysfs entries of MCA
           threshold controls instead of freeing the memory right in the CPU
           teardown code, which leads to another use-after-free when the
           associated sysfs file is opened and accessed"
      
      * tag 'ras-urgent-2020-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mce/amd: Fix kobject lifetime
        x86/mce/amd: Publish the bank pointer only after setup has succeeded
      dca132a6
    • P
      audit: fix error handling in audit_data_to_entry() · 2ad3e17e
      Paul Moore 提交于
      Commit 219ca394 ("audit: use union for audit_field values since
      they are mutually exclusive") combined a number of separate fields in
      the audit_field struct into a single union.  Generally this worked
      just fine because they are generally mutually exclusive.
      Unfortunately in audit_data_to_entry() the overlap can be a problem
      when a specific error case is triggered that causes the error path
      code to attempt to cleanup an audit_field struct and the cleanup
      involves attempting to free a stored LSM string (the lsm_str field).
      Currently the code always has a non-NULL value in the
      audit_field.lsm_str field as the top of the for-loop transfers a
      value into audit_field.val (both .lsm_str and .val are part of the
      same union); if audit_data_to_entry() fails and the audit_field
      struct is specified to contain a LSM string, but the
      audit_field.lsm_str has not yet been properly set, the error handling
      code will attempt to free the bogus audit_field.lsm_str value that
      was set with audit_field.val at the top of the for-loop.
      
      This patch corrects this by ensuring that the audit_field.val is only
      set when needed (it is cleared when the audit_field struct is
      allocated with kcalloc()).  It also corrects a few other issues to
      ensure that in case of error the proper error code is returned.
      
      Cc: stable@vger.kernel.org
      Fixes: 219ca394 ("audit: use union for audit_field values since they are mutually exclusive")
      Reported-by: syzbot+1f4d90ead370d72e450b@syzkaller.appspotmail.com
      Signed-off-by: NPaul Moore <paul@paul-moore.com>
      2ad3e17e
    • L
      Merge tag 'irq-urgent-2020-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f3cc2494
      Linus Torvalds 提交于
      Pull irq fixes from Thomas Gleixner:
       "Two fixes for the irq core code which are follow ups to the recent MSI
        fixes:
      
         - The WARN_ON which was put into the MSI setaffinity callback for
           paranoia reasons actually triggered via a callchain which escaped
           when all the possible ways to reach that code were analyzed.
      
           The proc/irq/$N/*affinity interfaces have a quirk which came in
           when ALPHA moved to the generic interface: In case that the written
           affinity mask does not contain any online CPU it calls into ALPHAs
           magic auto affinity setting code.
      
           A few years later this mechanism was also made available to x86 for
           no good reasons and in a way which circumvents all sanity checks
           for interrupts which cannot have their affinity set from process
           context on X86 due to the way the X86 interrupt delivery works.
      
           It would be possible to make this work properly, but there is no
           point in doing so. If the interrupt is not yet started then the
           affinity setting has no effect and if it is started already then it
           is already assigned to an online CPU so there is no point to
           randomly move it to some other CPU. Just return EINVAL as the code
           has done before that change forever.
      
         - The new MSI quirk bit in the irq domain flags turned out to be
           already occupied, which escaped the author and the reviewers
           because the already in use bits were 0,6,2,3,4,5 listed in that
           order.
      
           That bit 6 was simply overlooked because the ordering was straight
           forward linear otherwise. So the new bit ended up being a
           duplicate.
      
           Fix it up by switching the oddball 6 to the obvious 1"
      
      * tag 'irq-urgent-2020-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq/irqdomain: Make sure all irq domain flags are distinct
        genirq/proc: Reject invalid affinity masks (again)
      f3cc2494
    • L
      Merge tag 'x86-urgent-2020-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · fca10378
      Linus Torvalds 提交于
      Pull x86 fixes from Thomas Gleixner:
       "Two fixes for x86:
      
         - Remove the __force_oder definiton from the kaslr boot code as it is
           already defined in the page table code which makes GCC 10 builds
           fail because it changed the default to -fno-common.
      
         - Address the AMD erratum 1054 concerning the IRPERF capability and
           enable the Instructions Retired fixed counter on machines which are
           not affected by the erratum"
      
      * tag 'x86-urgent-2020-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu/amd: Enable the fixed Instructions Retired counter IRPERF
        x86/boot/compressed: Don't declare __force_order in kaslr_64.c
      fca10378
    • L
      Merge tag 'zonefs-5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs · 0a115e5f
      Linus Torvalds 提交于
      Pull zonefs fix from Damien Le Moal:
       "A single patch fixing typos in the documentation file"
      
      * tag 'zonefs-5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs:
        zonefs: fix documentation typos etc.
      0a115e5f
    • L
      Merge tag 'io_uring-5.6-2020-02-22' of git://git.kernel.dk/linux-block · b88025ea
      Linus Torvalds 提交于
      Pull io_uring fixes from Jens Axboe:
       "Here's a small collection of fixes that were queued up:
      
         - Remove unnecessary NULL check (Dan)
      
         - Missing io_req_cancelled() call in fallocate (Pavel)
      
         - Put the cleanup check for aux data in the right spot (Pavel)
      
         - Two fixes for SQPOLL (Stefano, Xiaoguang)"
      
      * tag 'io_uring-5.6-2020-02-22' of git://git.kernel.dk/linux-block:
        io_uring: fix __io_iopoll_check deadlock in io_sq_thread
        io_uring: prevent sq_thread from spinning when it should stop
        io_uring: fix use-after-free by io_cleanup_req()
        io_uring: remove unnecessary NULL checks
        io_uring: add missing io_req_cancelled()
      b88025ea