1. 09 11月, 2018 4 次提交
    • L
      Merge tag 's390-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 3541833f
      Linus Torvalds 提交于
      Pull s390 fixes from Martin Schwidefsky:
      
       - A fix for the pgtable_bytes misaccounting on s390. The patch changes
         common code part in regard to page table folding and adds extra
         checks to mm_[inc|dec]_nr_[pmds|puds].
      
       - Add FORCE for all build targets using if_changed
      
       - Use non-loadable phdr for the .vmlinux.info section to avoid a
         segment overlap that confuses kexec
      
       - Cleanup the attribute definition for the diagnostic sampling
      
       - Increase stack size for CONFIG_KASAN=y builds
      
       - Export __node_distance to fix a build error
      
       - Correct return code of a PMU event init function
      
       - An update for the default configs
      
      * tag 's390-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/perf: Change CPUM_CF return code in event init function
        s390: update defconfigs
        s390/mm: Fix ERROR: "__node_distance" undefined!
        s390/kasan: increase instrumented stack size to 64k
        s390/cpum_sf: Rework attribute definition for diagnostic sampling
        s390/mm: fix mis-accounting of pgtable_bytes
        mm: add mm_pxd_folded checks to pgtable_bytes accounting functions
        mm: introduce mm_[p4d|pud|pmd]_folded
        mm: make the __PAGETABLE_PxD_FOLDED defines non-empty
        s390: avoid vmlinux segments overlap
        s390/vdso: add missing FORCE to build targets
        s390/decompressor: add missing FORCE to build targets
      3541833f
    • L
      Merge tag 'xfs-4.20-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 24ccea7e
      Linus Torvalds 提交于
      Pull xfs fixes from Darrick Wong:
      
       - fix incorrect dropping of error code from bmap
      
       - print buffer offsets instead of useless hashed pointers when dumping
         corrupt metadata
      
       - fix integer overflow in attribute verifier
      
      * tag 'xfs-4.20-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: fix overflow in xfs_attr3_leaf_verify
        xfs: print buffer offsets when dumping corrupt buffers
        xfs: Fix error code in 'xfs_ioc_getbmap()'
      24ccea7e
    • L
      Merge tag 'led-fixes-for-4.20-rc2' of... · 6a1ac56c
      Linus Torvalds 提交于
      Merge tag 'led-fixes-for-4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds
      
      Pull LED fixes from Jacek Anaszewski:
       "All three fixes are related to the newly added pattern trigger:
      
         - remove mutex_lock() from timer callback, which would trigger
           problems related to sleeping in atomic context, the removal is
           harmless since mutex protection turned out to be redundant in this
           case
      
         - fix pattern parsing to properly handle intervals with brightness == 0
      
         - fix typos in the ABI documentation"
      
      * tag 'led-fixes-for-4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
        Documentation: ABI: led-trigger-pattern: Fix typos
        leds: trigger: Fix sleeping function called from invalid context
        Fix pattern handling optimalization
      6a1ac56c
    • L
      Merge tag 'sound-4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · d464572a
      Linus Torvalds 提交于
      Pull sound fixes from Takashi Iwai:
       "Two small regression fixes for HD-audio: one about vga_switcheroo and
        runtime PM, and another about Oops on some Thinkpads"
      
      * tag 'sound-4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - Fix incorrect clearance of thinkpad_acpi hooks
        vga_switcheroo: Fix missing gpu_bound call at audio client registration
      d464572a
  2. 08 11月, 2018 10 次提交
    • L
      Merge tag 'compiler-attributes-for-linus-v4.20-rc2' of https://github.com/ojeda/linux · b00d2092
      Linus Torvalds 提交于
      Pull compiler attribute fixlets from Miguel Ojeda:
       "Small improvements to Compiler Attributes:
      
         - Define asm_volatile_goto for non-gcc compilers (Nick Desaulniers)
      
         - Improve the explanation of compiler_attributes.h"
      
      * tag 'compiler-attributes-for-linus-v4.20-rc2' of https://github.com/ojeda/linux:
        Compiler Attributes: improve explanation of header
        include/linux/compiler*.h: define asm_volatile_goto
      b00d2092
    • L
      Merge tag 'mtd/fixes-for-4.20-rc2' of git://git.infradead.org/linux-mtd · d50ffc58
      Linus Torvalds 提交于
      Pull MTD fixes from Boris Brezillon:
       "MTD changes:
         - Kill a VLA in sa1100
      
        SPI NOR changes:
         - Make sure ->addr_width is restored when SFDP parsing fails
         - Propate errors happening in cqspi_direct_read_execute()
      
        NAND changes:
         - Fix kernel-doc mismatch
         - Fix nanddev_neraseblocks() to return the correct value
         - Avoid selection of BCH_CONST_PARAMS when some users require dynamic
           BCH settings"
      
      * tag 'mtd/fixes-for-4.20-rc2' of git://git.infradead.org/linux-mtd:
        mtd: nand: Fix nanddev_pos_next_page() kernel-doc header
        mtd: sa1100: avoid VLA in sa1100_setup_mtd
        mtd: spi-nor: Reset nor->addr_width when SFDP parsing failed
        mtd: spi-nor: cadence-quadspi: Return error code in cqspi_direct_read_execute()
        mtd: nand: Fix nanddev_neraseblocks()
        mtd: nand: drop kernel-doc notation for a deleted function parameter
        mtd: docg3: don't set conflicting BCH_CONST_PARAMS option
      d50ffc58
    • M
      Compiler Attributes: improve explanation of header · 24efee41
      Miguel Ojeda 提交于
      Explain better what "optional" attributes are, and avoid calling
      them so to avoid confusion. Simply retain "Optional" as a word
      to look for in the comments.
      
      Moreover, add a couple sentences to explain a bit more the intention
      and the documentation links.
      Signed-off-by: NMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
      24efee41
    • T
      s390/perf: Change CPUM_CF return code in event init function · 0bb2ae1b
      Thomas Richter 提交于
      The function perf_init_event() creates a new event and
      assignes it to a PMU. This a done in a loop over all existing
      PMUs. For each listed PMU the event init function is called
      and if this function does return any other error than -ENOENT,
      the loop is terminated the creation of the event fails.
      
      If the event is invalid, return -ENOENT to try other PMUs.
      Signed-off-by: NThomas Richter <tmricht@linux.ibm.com>
      Reviewed-by: NHendrik Brueckner <brueckner@linux.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      0bb2ae1b
    • G
      Documentation: ABI: led-trigger-pattern: Fix typos · 406e7f98
      Geert Uytterhoeven 提交于
        - Spelling s/brigntess/brightness/,
        - Double "use".
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NJacek Anaszewski <jacek.anaszewski@gmail.com>
      406e7f98
    • B
      leds: trigger: Fix sleeping function called from invalid context · 3a40cfe8
      Baolin Wang 提交于
      We will meet below issue due to mutex_lock() is called in interrupt context.
      The mutex lock is used to protect the pattern trigger data, but before changing
      new pattern trigger data (pattern values or repeat value) by users, we always
      cancel the timer firstly to clear previous patterns' performance. That means
      there is no race in pattern_trig_timer_function(), so we can drop the mutex
      lock in pattern_trig_timer_function() to avoid this issue.
      
      Moreover we can move the timer cancelling into mutex protection, since there
      is no deadlock risk if we remove the mutex lock in pattern_trig_timer_function().
      
      BUG: sleeping function called from invalid context at kernel/locking/mutex.c:254
      in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper/1
      CPU: 1 PID: 0 Comm: swapper/1 Not tainted
      4.20.0-rc1-koelsch-00841-ga338c8181013c1a9 #171
      Hardware name: Generic R-Car Gen2 (Flattened Device Tree)
      [<c020f19c>] (unwind_backtrace) from [<c020aecc>] (show_stack+0x10/0x14)
      [<c020aecc>] (show_stack) from [<c07affb8>] (dump_stack+0x7c/0x9c)
      [<c07affb8>] (dump_stack) from [<c02417d4>] (___might_sleep+0xf4/0x158)
      [<c02417d4>] (___might_sleep) from [<c07c92c4>] (mutex_lock+0x18/0x60)
      [<c07c92c4>] (mutex_lock) from [<c067b28c>] (pattern_trig_timer_function+0x1c/0x11c)
      [<c067b28c>] (pattern_trig_timer_function) from [<c027f6fc>] (call_timer_fn+0x1c/0x90)
      [<c027f6fc>] (call_timer_fn) from [<c027f944>] (expire_timers+0x94/0xa4)
      [<c027f944>] (expire_timers) from [<c027fc98>] (run_timer_softirq+0x108/0x15c)
      [<c027fc98>] (run_timer_softirq) from [<c02021cc>] (__do_softirq+0x1d4/0x258)
      [<c02021cc>] (__do_softirq) from [<c0224d24>] (irq_exit+0x64/0xc4)
      [<c0224d24>] (irq_exit) from [<c0268dd0>] (__handle_domain_irq+0x80/0xb4)
      [<c0268dd0>] (__handle_domain_irq) from [<c045e1b0>] (gic_handle_irq+0x58/0x90)
      [<c045e1b0>] (gic_handle_irq) from [<c02019f8>] (__irq_svc+0x58/0x74)
      Exception stack(0xeb483f60 to 0xeb483fa8)
      3f60: 00000000 00000000 eb9afaa0 c0217e80 00000000 ffffe000 00000000 c0e06408
      3f80: 00000002 c0e0647c c0c6a5f0 00000000 c0e04900 eb483fb0 c0207ea8 c0207e98
      3fa0: 60020013 ffffffff
      [<c02019f8>] (__irq_svc) from [<c0207e98>] (arch_cpu_idle+0x1c/0x38)
      [<c0207e98>] (arch_cpu_idle) from [<c0247ca8>] (do_idle+0x138/0x268)
      [<c0247ca8>] (do_idle) from [<c0248050>] (cpu_startup_entry+0x18/0x1c)
      [<c0248050>] (cpu_startup_entry) from [<402022ec>] (0x402022ec)
      
      Fixes: 5fd752b6 ("leds: core: Introduce LED pattern trigger")
      Signed-off-by: NBaolin Wang <baolin.wang@linaro.org>
      Reported-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Tested-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NJacek Anaszewski <jacek.anaszewski@gmail.com>
      3a40cfe8
    • L
      Merge tag 'hwmon-for-v4.20-rc2' of... · 85758777
      Linus Torvalds 提交于
      Merge tag 'hwmon-for-v4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon fixes from Guenter Roeck:
      
       - Remove bogus __init annotations in ibmpowernv driver
      
       - Fix double-free in error handling of __hwmon_device_register()
      
      * tag 'hwmon-for-v4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (ibmpowernv) Remove bogus __init annotations
        hwmon: (core) Fix double-free in __hwmon_device_register()
      85758777
    • L
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · e09d51ad
      Linus Torvalds 提交于
      Pull ARM SoC fixes from Olof Johansson:
       "A few more fixes that have come in, and one revert of a previous fix.
      
        I was a bit too trigger happy to enable PREEMPT on multi_v7_defconfig,
        and it ended up regressing at least BeagleBone XM boards. While we get
        that debugged for next merge window, let's disable it again.
      
        Beyond that:
      
         - Stratix change to fix multicast filtering
      
         - Minor DT fixes for Renesas and i.MX
      
         - Ethernet fix for a Renesas board (switching main interfaces)
      
         - Ethernet phy regulator fix for i.MX6SX"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        arm64: dts: stratix10: fix multicast filtering
        ARM: defconfig: Disable PREEMPT again on  multi_v7
        arm64: dts: renesas: condor: switch from EtherAVB to GEther
        dt-bindings: arm: Fix RZ/G2E part number
        arm64: dts: renesas: r8a7795: add missing dma-names on hscif2
        ARM: dts: imx6sx-sdb: Fix enet phy regulator
        ARM: dts: fsl: Fix improperly quoted stdout-path values
        ARM: dts: imx6sll: fix typo for fsl,imx6sll-i2c node
      e09d51ad
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid · ecb4d529
      Linus Torvalds 提交于
      Pull HID fixes from Jiri Kosina:
      
       - hid.git is moving towards group maintainership (where group is myself
         and Benjamin Tissoires), therefore this pull request updates
         MAINTAINERS accordingly
      
       - fix for hid-asus config dependency from Arnd Bergmann
      
       - two device-specific quirks for i2c-hid from Julian Sax and Kai-Heng
         Feng
      
       - other few small assorted fixes
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
        HID: fix up .raw_event() documentation
        HID: asus: fix build warning wiht CONFIG_ASUS_WMI disabled
        HID: i2c-hid: add Direkt-Tek DTLAPY133-1 to descriptor override
        HID: moving to group maintainership model
        HID: alps: allow incoming reports when only the trackstick is opened
        Revert "HID: add NOGET quirk for Eaton Ellipse MAX UPS"
        HID: i2c-hid: Add a small delay after sleep command for Raydium touchpanel
        HID: hiddev: fix potential Spectre v1
      ecb4d529
    • O
      Merge tag 'stratix10_dts_fix_for_v4.20' of... · a89f84a5
      Olof Johansson 提交于
      Merge tag 'stratix10_dts_fix_for_v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into fixes
      
      ARM: dts: stratix10: fix multicast filtering
      
      On Stratix 10, the EMAC has 256 hash buckets for multicast filtering. This
      needs to be specified in DTS, otherwise the stmmac driver defaults to 64
      buckets and initializes the filter incorrectly. As a result, e.g. valid
      IPv6 multicast traffic ends up being dropped.
      
      * tag 'stratix10_dts_fix_for_v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux:
        arm64: dts: stratix10: fix multicast filtering
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      a89f84a5
  3. 07 11月, 2018 4 次提交
  4. 06 11月, 2018 22 次提交
    • D
      xfs: fix overflow in xfs_attr3_leaf_verify · 837514f7
      Dave Chinner 提交于
      generic/070 on 64k block size filesystems is failing with a verifier
      corruption on writeback or an attribute leaf block:
      
      [   94.973083] XFS (pmem0): Metadata corruption detected at xfs_attr3_leaf_verify+0x246/0x260, xfs_attr3_leaf block 0x811480
      [   94.975623] XFS (pmem0): Unmount and run xfs_repair
      [   94.976720] XFS (pmem0): First 128 bytes of corrupted metadata buffer:
      [   94.978270] 000000004b2e7b45: 00 00 00 00 00 00 00 00 3b ee 00 00 00 00 00 00  ........;.......
      [   94.980268] 000000006b1db90b: 00 00 00 00 00 81 14 80 00 00 00 00 00 00 00 00  ................
      [   94.982251] 00000000433f2407: 22 7b 5c 82 2d 5c 47 4c bb 31 1c 37 fa a9 ce d6  "{\.-\GL.1.7....
      [   94.984157] 0000000010dc7dfb: 00 00 00 00 00 81 04 8a 00 0a 18 e8 dd 94 01 00  ................
      [   94.986215] 00000000d5a19229: 00 a0 dc f4 fe 98 01 68 f0 d8 07 e0 00 00 00 00  .......h........
      [   94.988171] 00000000521df36c: 0c 2d 32 e2 fe 20 01 00 0c 2d 58 65 fe 0c 01 00  .-2.. ...-Xe....
      [   94.990162] 000000008477ae06: 0c 2d 5b 66 fe 8c 01 00 0c 2d 71 35 fe 7c 01 00  .-[f.....-q5.|..
      [   94.992139] 00000000a4a6bca6: 0c 2d 72 37 fc d4 01 00 0c 2d d8 b8 f0 90 01 00  .-r7.....-......
      [   94.994789] XFS (pmem0): xfs_do_force_shutdown(0x8) called from line 1453 of file fs/xfs/xfs_buf.c. Return address = ffffffff815365f3
      
      This is failing this check:
      
                      end = ichdr.freemap[i].base + ichdr.freemap[i].size;
                      if (end < ichdr.freemap[i].base)
      >>>>>                   return __this_address;
                      if (end > mp->m_attr_geo->blksize)
                              return __this_address;
      
      And from the buffer output above, the freemap array is:
      
      	freemap[0].base = 0x00a0
      	freemap[0].size = 0xdcf4	end = 0xdd94
      	freemap[1].base = 0xfe98
      	freemap[1].size = 0x0168	end = 0x10000
      	freemap[2].base = 0xf0d8
      	freemap[2].size = 0x07e0	end = 0xf8b8
      
      These all look valid - the block size is 0x10000 and so from the
      last check in the above verifier fragment we know that the end
      of freemap[1] is valid. The problem is that end is declared as:
      
      	uint16_t	end;
      
      And (uint16_t)0x10000 = 0. So we have a verifier bug here, not a
      corruption. Fix the verifier to use uint32_t types for the check and
      hence avoid the overflow.
      
      Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=201577Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      837514f7
    • D
      xfs: print buffer offsets when dumping corrupt buffers · bdec055b
      Darrick J. Wong 提交于
      Use DUMP_PREFIX_OFFSET when printing hex dumps of corrupt buffers
      because modern Linux now prints a 32-bit hash of our 64-bit pointer when
      using DUMP_PREFIX_ADDRESS:
      
      00000000b4bb4297: 00 00 00 00 00 00 00 00 3b ee 00 00 00 00 00 00  ........;.......
      00000005ec77e26: 00 00 00 00 02 d0 5a 00 00 00 00 00 00 00 00 00  ......Z.........
      000000015938018: 21 98 e8 b4 fd de 4c 07 bc ea 3c e5 ae b4 7c 48  !.....L...<...|H
      
      This is totally worthless for a sequential dump since we probably only
      care about tracking the buffer offsets and afaik there's no way to
      recover the actual pointer from the hashed value.
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Reviewed-by: NDave Chinner <dchinner@redhat.com>
      bdec055b
    • C
      xfs: Fix error code in 'xfs_ioc_getbmap()' · 132bf672
      Christophe JAILLET 提交于
      In this function, once 'buf' has been allocated, we unconditionally
      return 0.
      However, 'error' is set to some error codes in several error handling
      paths.
      Before commit 232b5194 ("xfs: simplify the xfs_getbmap interface")
      this was not an issue because all error paths were returning directly,
      but now that some cleanup at the end may be needed, we must propagate the
      error code.
      
      Fixes: 232b5194 ("xfs: simplify the xfs_getbmap interface")
      Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      132bf672
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · a13511df
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Handle errors mid-stream of an all dump, from Alexey Kodanev.
      
       2) Fix build of openvswitch with certain combinations of netfilter
          options, from Arnd Bergmann.
      
       3) Fix interactions between GSO and BQL, from Eric Dumazet.
      
       4) Don't put a '/' in RTL8201F's sysfs file name, from Holger
          Hoffstätte.
      
       5) S390 qeth driver fixes from Julian Wiedmann.
      
       6) Allow ipv6 link local addresses for netconsole when both source and
          destination are link local, from Matwey V. Kornilov.
      
       7) Fix the BPF program address seen in /proc/kallsyms, from Song Liu.
      
       8) Initialize mutex before use in dsa microchip driver, from Tristram
          Ha.
      
       9) Out-of-bounds access in hns3, from Yunsheng Lin.
      
      10) Various netfilter fixes from Stefano Brivio, Jozsef Kadlecsik, Jiri
          Slaby, Florian Westphal, Eric Westbrook, Andrey Ryabinin, and Pablo
          Neira Ayuso.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (50 commits)
        net: alx: make alx_drv_name static
        net: bpfilter: fix iptables failure if bpfilter_umh is disabled
        sock_diag: fix autoloading of the raw_diag module
        net: core: netpoll: Enable netconsole IPv6 link local address
        ipv6: properly check return value in inet6_dump_all()
        rtnetlink: restore handling of dumpit return value in rtnl_dump_all()
        net/ipv6: Move anycast init/cleanup functions out of CONFIG_PROC_FS
        bonding/802.3ad: fix link_failure_count tracking
        net: phy: realtek: fix RTL8201F sysfs name
        sctp: define SCTP_SS_DEFAULT for Stream schedulers
        sctp: fix strchange_flags name for Stream Change Event
        mlxsw: spectrum: Fix IP2ME CPU policer configuration
        openvswitch: fix linking without CONFIG_NF_CONNTRACK_LABELS
        qed: fix link config error handling
        net: hns3: Fix for out-of-bounds access when setting pfc back pressure
        net/mlx4_en: use __netdev_tx_sent_queue()
        net: do not abort bulk send on BQL status
        net: bql: add __netdev_tx_sent_queue()
        s390/qeth: report 25Gbit link speed
        s390/qeth: sanitize ARP requests
        ...
      a13511df
    • T
      ALSA: hda - Fix incorrect clearance of thinkpad_acpi hooks · 5e93a125
      Takashi Iwai 提交于
      Since the commit c647f806 ("ALSA: hda - Allow multiple ADCs for
      mic mute LED controls") we allow enabling the mic mute LED with
      multiple ADCs.  The commit changed the function return value to be
      zero or a negative error, while this change was overlooked in the
      thinkpad_acpi helper code where it still expects a positive return
      value for success.  This eventually leads to a NULL dereference on a
      system that has only a mic mute LED.
      
      This patch corrects the return value check in the corresponding code
      as well.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201621
      Fixes: c647f806 ("ALSA: hda - Allow multiple ADCs for mic mute LED controls")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      5e93a125
    • N
      include/linux/compiler*.h: define asm_volatile_goto · 8bd66d14
      ndesaulniers@google.com 提交于
      asm_volatile_goto should also be defined for other compilers that support
      asm goto.
      
      Fixes commit 815f0ddb ("include/linux/compiler*.h: make compiler-*.h
      mutually exclusive").
      Signed-off-by: NNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: NMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
      8bd66d14
    • L
      HID: fix up .raw_event() documentation · aa9b760c
      Linus Walleij 提交于
      The documentation for the .raw_event() callback says that if the
      driver return 1, there will be no further processing of the event,
      but this is not true, the actual code in hid-core.c looks like this:
      
        if (hdrv && hdrv->raw_event && hid_match_report(hid, report)) {
                 ret = hdrv->raw_event(hid, report, data, size);
                 if (ret < 0)
                         goto unlock;
         }
      
         ret = hid_report_raw_event(hid, type, data, size, interrupt);
      
      The only return value that has any effect on the processing is
      a negative error.
      
      Correct this as it seems to confuse people: I found bogus code in
      the Razer out-of-tree driver attempting to return 1 here.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      aa9b760c
    • A
      HID: asus: fix build warning wiht CONFIG_ASUS_WMI disabled · 3fc202e8
      Arnd Bergmann 提交于
      asus_wmi_evaluate_method() is an empty dummy function when CONFIG_ASUS_WMI
      is disabled, or not reachable from a built-in device driver. This leads to
      a theoretical evaluation of an uninitialized variable that the compiler
      complains about, failing to check that the hardcoded return value makes
      this an unreachable code path:
      
      In file included from include/linux/printk.h:336,
                       from include/linux/kernel.h:14,
                       from include/linux/list.h:9,
                       from include/linux/dmi.h:5,
                       from drivers/hid/hid-asus.c:29:
      drivers/hid/hid-asus.c: In function 'asus_input_configured':
      include/linux/dynamic_debug.h:135:3: error: 'value' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         __dynamic_dev_dbg(&descriptor, dev, fmt, \
         ^~~~~~~~~~~~~~~~~
      drivers/hid/hid-asus.c:359:6: note: 'value' was declared here
        u32 value;
            ^~~~~
      
      With an extra IS_ENABLED() check, the warning goes away.
      
      Fixes: 3b692c55 ("HID: asus: only support backlight when it's not driven by WMI")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      3fc202e8
    • J
      Merge branch 'master' into for-4.20/upstream-fixes · 0c724420
      Jiri Kosina 提交于
      Pull in a merge commit that brought in 3b692c55 ("HID: asus: only
      support backlight when it's not driven by WMI") so that fixup could be
      applied on top of it.
      0c724420
    • A
      ARM: 8809/1: proc-v7: fix Thumb annotation of cpu_v7_hvc_switch_mm · 6282e916
      Ard Biesheuvel 提交于
      Due to what appears to be a copy/paste error, the opening ENTRY()
      of cpu_v7_hvc_switch_mm() lacks a matching ENDPROC(), and instead,
      the one for cpu_v7_smc_switch_mm() is duplicated.
      
      Given that it is ENDPROC() that emits the Thumb annotation, the
      cpu_v7_hvc_switch_mm() routine will be called in ARM mode on a
      Thumb2 kernel, resulting in the following splat:
      
        Internal error: Oops - undefined instruction: 0 [#1] SMP THUMB2
        Modules linked in:
        CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.18.0-rc1-00030-g4d28ad89189d-dirty #488
        Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015
        PC is at cpu_v7_hvc_switch_mm+0x12/0x18
        LR is at flush_old_exec+0x31b/0x570
        pc : [<c0316efe>]    lr : [<c04117c7>]    psr: 00000013
        sp : ee899e50  ip : 00000000  fp : 00000001
        r10: eda28f34  r9 : eda31800  r8 : c12470e0
        r7 : eda1fc00  r6 : eda53000  r5 : 00000000  r4 : ee88c000
        r3 : c0316eec  r2 : 00000001  r1 : eda53000  r0 : 6da6c000
        Flags: nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
      
      Note the 'ISA ARM' in the last line.
      
      Fix this by using the correct name in ENDPROC().
      
      Cc: <stable@vger.kernel.org>
      Fixes: 10115105 ("ARM: spectre-v2: add firmware based hardening")
      Reviewed-by: NDave Martin <Dave.Martin@arm.com>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      6282e916
    • B
      mtd: sa1100: avoid VLA in sa1100_setup_mtd · ba26cd7d
      Boris Brezillon 提交于
      Enabling -Wvla found another variable-length array with randconfig
      testing:
      
      drivers/mtd/maps/sa1100-flash.c: In function 'sa1100_setup_mtd':
      drivers/mtd/maps/sa1100-flash.c:224:10: error: ISO C90 forbids variable length array 'cdev' [-Werror=vla]
      
      Dynamically allocate the cdev array passed to mtd_concat_create()
      instead of using a VLA.
      Reported-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Olof Johansson <olof@lixom.net>
      ba26cd7d
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf · a422757e
      David S. Miller 提交于
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      The following patchset contains the first batch of Netfilter fixes for
      your net tree:
      
      1) Fix splat with IPv6 defragmenting locally generated fragments,
         from Florian Westphal.
      
      2) Fix Incorrect check for missing attribute in nft_osf.
      
      3) Missing INT_MIN & INT_MAX definition for netfilter bridge uapi
         header, from Jiri Slaby.
      
      4) Revert map lookup in nft_numgen, this is already possible with
         the existing infrastructure without this extension.
      
      5) Fix wrong listing of set reference counter, make counter
         synchronous again, from Stefano Brivio.
      
      6) Fix CIDR 0 in hash:net,port,net, from Eric Westbrook.
      
      7) Fix allocation failure with large set, use kvcalloc().
         From Andrey Ryabinin.
      
      8) No need to disable BH when fetch ip set comment, patch from
         Jozsef Kadlecsik.
      
      9) Sanity check for valid sysfs entry in xt_IDLETIMER, from
         Taehee Yoo.
      
      10) Fix suspicious rcu usage via ip_set() macro at netlink dump,
          from Jozsef Kadlecsik.
      
      11) Fix setting default timeout via nfnetlink_cttimeout, this
          comes with preparation patch to add nf_{tcp,udp,...}_pernet()
          helper.
      
      12) Allow ebtables table nat to be of filter type via nft_compat.
          From Florian Westphal.
      
      13) Incorrect calculation of next bucket in early_drop, do no bump
          hash value, update bucket counter instead. From Vasily Khoruzhick.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a422757e
    • R
      net: alx: make alx_drv_name static · 71311931
      Rasmus Villemoes 提交于
      alx_drv_name is not used outside main.c, so there's no reason for it to
      have external linkage.
      Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      71311931
    • T
      net: bpfilter: fix iptables failure if bpfilter_umh is disabled · 97adadda
      Taehee Yoo 提交于
      When iptables command is executed, ip_{set/get}sockopt() try to upload
      bpfilter.ko if bpfilter is enabled. if it couldn't find bpfilter.ko,
      command is failed.
      bpfilter.ko is generated if CONFIG_BPFILTER_UMH is enabled.
      ip_{set/get}sockopt() only checks CONFIG_BPFILTER.
      So that if CONFIG_BPFILTER is enabled and CONFIG_BPFILTER_UMH is disabled,
      iptables command is always failed.
      
      test config:
         CONFIG_BPFILTER=y
         # CONFIG_BPFILTER_UMH is not set
      
      test command:
         %iptables -L
         iptables: No chain/target/match by that name.
      
      Fixes: d2ba09c1 ("net: add skeleton of bpfilter kernel module")
      Signed-off-by: NTaehee Yoo <ap420073@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      97adadda
    • A
      sock_diag: fix autoloading of the raw_diag module · c34c1287
      Andrei Vagin 提交于
      IPPROTO_RAW isn't registred as an inet protocol, so
      inet_protos[protocol] is always NULL for it.
      
      Cc: Cyrill Gorcunov <gorcunov@gmail.com>
      Cc: Xin Long <lucien.xin@gmail.com>
      Fixes: bf2ae2e4 ("sock_diag: request _diag module only when the family or proto has been registered")
      Signed-off-by: NAndrei Vagin <avagin@gmail.com>
      Reviewed-by: NCyrill Gorcunov <gorcunov@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c34c1287
    • M
      net: core: netpoll: Enable netconsole IPv6 link local address · d016b4a3
      Matwey V. Kornilov 提交于
      There is no reason to discard using source link local address when
      remote netconsole IPv6 address is set to be link local one.
      
      The patch allows administrators to use IPv6 netconsole without
      explicitly configuring source address:
      
          netconsole=@/,@fe80::5054:ff:fe2f:6012/
      Signed-off-by: NMatwey V. Kornilov <matwey@sai.msu.ru>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d016b4a3
    • A
      ipv6: properly check return value in inet6_dump_all() · e22d0bfa
      Alexey Kodanev 提交于
      Make sure we call fib6_dump_end() if it happens that skb->len
      is zero. rtnl_dump_all() can reset cb->args on the next loop
      iteration there.
      
      Fixes: 08e814c9 ("net/ipv6: Bail early if user only wants cloned entries")
      Fixes: ae677bbb ("net: Don't return invalid table id error when dumping all families")
      Signed-off-by: NAlexey Kodanev <alexey.kodanev@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e22d0bfa
    • A
      rtnetlink: restore handling of dumpit return value in rtnl_dump_all() · 5e1acb4a
      Alexey Kodanev 提交于
      For non-zero return from dumpit() we should break the loop
      in rtnl_dump_all() and return the result. Otherwise, e.g.,
      we could get the memory leak in inet6_dump_fib() [1]. The
      pointer to the allocated struct fib6_walker there (saved
      in cb->args) can be lost, reset on the next iteration.
      
      Fix it by partially restoring the previous behavior before
      commit c63586dc ("net: rtnl_dump_all needs to propagate
      error from dumpit function"). The returned error from
      dumpit() is still passed further.
      
      [1]:
      unreferenced object 0xffff88001322a200 (size 96):
        comm "sshd", pid 1484, jiffies 4296032768 (age 1432.542s)
        hex dump (first 32 bytes):
          00 01 00 00 00 00 ad de 00 02 00 00 00 00 ad de  ................
          18 09 41 36 00 88 ff ff 18 09 41 36 00 88 ff ff  ..A6......A6....
        backtrace:
          [<0000000095846b39>] kmem_cache_alloc_trace+0x151/0x220
          [<000000007d12709f>] inet6_dump_fib+0x68d/0x940
          [<000000002775a316>] rtnl_dump_all+0x1d9/0x2d0
          [<00000000d7cd302b>] netlink_dump+0x945/0x11a0
          [<000000002f43485f>] __netlink_dump_start+0x55d/0x800
          [<00000000f76bbeec>] rtnetlink_rcv_msg+0x4fa/0xa00
          [<000000009b5761f3>] netlink_rcv_skb+0x29c/0x420
          [<0000000087a1dae1>] rtnetlink_rcv+0x15/0x20
          [<00000000691b703b>] netlink_unicast+0x4e3/0x6c0
          [<00000000b5be0204>] netlink_sendmsg+0x7f2/0xba0
          [<0000000096d2aa60>] sock_sendmsg+0xba/0xf0
          [<000000008c1b786f>] __sys_sendto+0x1e4/0x330
          [<0000000019587b3f>] __x64_sys_sendto+0xe1/0x1a0
          [<00000000071f4d56>] do_syscall_64+0x9f/0x300
          [<000000002737577f>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
          [<0000000057587684>] 0xffffffffffffffff
      
      Fixes: c63586dc ("net: rtnl_dump_all needs to propagate error from dumpit function")
      Signed-off-by: NAlexey Kodanev <alexey.kodanev@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5e1acb4a
    • B
      mtd: spi-nor: Reset nor->addr_width when SFDP parsing failed · 90c31cb9
      Boris Brezillon 提交于
      Commit 5390a8df ("mtd: spi-nor: add support to non-uniform SFDP SPI
      NOR flash memories") removed the 'nor->addr_width = 0;' statement when
      spi_nor_parse_sfdp() returns an error, thus leaving ->addr_width in an
      undefined state which can cause trouble when spi_nor_scan() checks its
      value.
      Reported-by: NCyrille Pitchen <cyrille.pitchen@wedev4u.fr>
      Fixes: 5390a8df ("mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories")
      Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
      Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com>
      90c31cb9
    • C
      mtd: spi-nor: cadence-quadspi: Return error code in cqspi_direct_read_execute() · 91d7b670
      Christophe JAILLET 提交于
      We return 0 unconditionally in 'cqspi_direct_read_execute()'.
      However, 'ret' is set to some error codes in several error handling
      paths.
      
      Return 'ret' instead to propagate the error code.
      
      Fixes: ffa639e0 ("mtd: spi-nor: cadence-quadspi: Add DMA support for direct mode reads")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
      91d7b670
    • J
      net/ipv6: Move anycast init/cleanup functions out of CONFIG_PROC_FS · 6915ed86
      Jeff Barnhill 提交于
      Move the anycast.c init and cleanup functions which were inadvertently
      added inside the CONFIG_PROC_FS definition.
      
      Fixes: 2384d025 ("net/ipv6: Add anycast addresses to a global hashtable")
      Signed-off-by: NJeff Barnhill <0xeffeff@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6915ed86
    • A
      arm64: dts: stratix10: fix multicast filtering · fd5ba6ee
      Aaro Koskinen 提交于
      On Stratix 10, the EMAC has 256 hash buckets for multicast filtering. This
      needs to be specified in DTS, otherwise the stmmac driver defaults to 64
      buckets and initializes the filter incorrectly. As a result, e.g. valid
      IPv6 multicast traffic ends up being dropped.
      
      Fixes: 78cd6a9d ("arm64: dts: Add base stratix 10 dtsi")
      Cc: stable@vger.kernel.org
      Signed-off-by: NAaro Koskinen <aaro.koskinen@nokia.com>
      Signed-off-by: NDinh Nguyen <dinguyen@kernel.org>
      fd5ba6ee