1. 26 1月, 2019 23 次提交
    • T
      ALSA: oxfw: add support for APOGEE duet FireWire · 3945c33a
      Takashi Sakamoto 提交于
      [ Upstream commit fba43f454cdf9caa3185219d116bd2a6e6354552 ]
      
      This commit adds support for APOGEE duet FireWire, launched 2007, already
      discontinued. This model uses Oxford Semiconductor FW971 as its
      communication engine. Below is information on Configuration ROM of this
      unit. The unit supports some AV/C commands defined by Audio subunit
      specification and vendor dependent commands.
      
      $ ./hinawa-config-rom-printer /dev/fw1
      { 'bus-info': { 'adj': False,
                      'bmc': False,
                      'chip_ID': 42949742248,
                      'cmc': False,
                      'cyc_clk_acc': 255,
                      'generation': 0,
                      'imc': False,
                      'isc': True,
                      'link_spd': 3,
                      'max_ROM': 0,
                      'max_rec': 64,
                      'name': '1394',
                      'node_vendor_ID': 987,
                      'pmc': False},
        'root-directory': [ ['VENDOR', 987],
                            ['DESCRIPTOR', 'Apogee Electronics'],
                            ['MODEL', 122333],
                            ['DESCRIPTOR', 'Duet'],
                            [ 'NODE_CAPABILITIES',
                              { 'addressing': {'64': True, 'fix': True, 'prv': False},
                                'misc': {'int': False, 'ms': False, 'spt': True},
                                'state': { 'atn': False,
                                           'ded': False,
                                           'drq': True,
                                           'elo': False,
                                           'init': False,
                                           'lst': True,
                                           'off': False},
                                'testing': {'bas': False, 'ext': False}}],
                            [ 'UNIT',
                              [ ['SPECIFIER_ID', 41005],
                                ['VERSION', 65537],
                                ['MODEL', 122333],
                                ['DESCRIPTOR', 'Duet']]]]}
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      3945c33a
    • A
      bpf: Allow narrow loads with offset > 0 · 464b01e4
      Andrey Ignatov 提交于
      [ Upstream commit 46f53a65d2de3e1591636c22b626b09d8684fd71 ]
      
      Currently BPF verifier allows narrow loads for a context field only with
      offset zero. E.g. if there is a __u32 field then only the following
      loads are permitted:
        * off=0, size=1 (narrow);
        * off=0, size=2 (narrow);
        * off=0, size=4 (full).
      
      On the other hand LLVM can generate a load with offset different than
      zero that make sense from program logic point of view, but verifier
      doesn't accept it.
      
      E.g. tools/testing/selftests/bpf/sendmsg4_prog.c has code:
      
        #define DST_IP4			0xC0A801FEU /* 192.168.1.254 */
        ...
        	if ((ctx->user_ip4 >> 24) == (bpf_htonl(DST_IP4) >> 24) &&
      
      where ctx is struct bpf_sock_addr.
      
      Some versions of LLVM can produce the following byte code for it:
      
             8:       71 12 07 00 00 00 00 00         r2 = *(u8 *)(r1 + 7)
             9:       67 02 00 00 18 00 00 00         r2 <<= 24
            10:       18 03 00 00 00 00 00 fe 00 00 00 00 00 00 00 00         r3 = 4261412864 ll
            12:       5d 32 07 00 00 00 00 00         if r2 != r3 goto +7 <LBB0_6>
      
      where `*(u8 *)(r1 + 7)` means narrow load for ctx->user_ip4 with size=1
      and offset=3 (7 - sizeof(ctx->user_family) = 3). This load is currently
      rejected by verifier.
      
      Verifier code that rejects such loads is in bpf_ctx_narrow_access_ok()
      what means any is_valid_access implementation, that uses the function,
      works this way, e.g. bpf_skb_is_valid_access() for __sk_buff or
      sock_addr_is_valid_access() for bpf_sock_addr.
      
      The patch makes such loads supported. Offset can be in [0; size_default)
      but has to be multiple of load size. E.g. for __u32 field the following
      loads are supported now:
        * off=0, size=1 (narrow);
        * off=1, size=1 (narrow);
        * off=2, size=1 (narrow);
        * off=3, size=1 (narrow);
        * off=0, size=2 (narrow);
        * off=2, size=2 (narrow);
        * off=0, size=4 (full).
      Reported-by: NYonghong Song <yhs@fb.com>
      Signed-off-by: NAndrey Ignatov <rdna@fb.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      464b01e4
    • A
      serial: set suppress_bind_attrs flag only if builtin · 4c7c36a7
      Anders Roxell 提交于
      [ Upstream commit 646097940ad35aa2c1f2012af932d55976a9f255 ]
      
      When the test 'CONFIG_DEBUG_TEST_DRIVER_REMOVE=y' is enabled,
      arch_initcall(pl011_init) came before subsys_initcall(default_bdi_init).
      devtmpfs gets killed because we try to remove a file and decrement the
      wb reference count before the noop_backing_device_info gets initialized.
      
      [    0.332075] Serial: AMBA PL011 UART driver
      [    0.485276] 9000000.pl011: ttyAMA0 at MMIO 0x9000000 (irq = 39, base_baud = 0) is a PL011 rev1
      [    0.502382] console [ttyAMA0] enabled
      [    0.515710] Unable to handle kernel paging request at virtual address 0000800074c12000
      [    0.516053] Mem abort info:
      [    0.516222]   ESR = 0x96000004
      [    0.516417]   Exception class = DABT (current EL), IL = 32 bits
      [    0.516641]   SET = 0, FnV = 0
      [    0.516826]   EA = 0, S1PTW = 0
      [    0.516984] Data abort info:
      [    0.517149]   ISV = 0, ISS = 0x00000004
      [    0.517339]   CM = 0, WnR = 0
      [    0.517553] [0000800074c12000] user address but active_mm is swapper
      [    0.517928] Internal error: Oops: 96000004 [#1] PREEMPT SMP
      [    0.518305] Modules linked in:
      [    0.518839] CPU: 0 PID: 13 Comm: kdevtmpfs Not tainted 4.19.0-rc5-next-20180928-00002-g2ba39ab0cd01-dirty #82
      [    0.519307] Hardware name: linux,dummy-virt (DT)
      [    0.519681] pstate: 80000005 (Nzcv daif -PAN -UAO)
      [    0.519959] pc : __destroy_inode+0x94/0x2a8
      [    0.520212] lr : __destroy_inode+0x78/0x2a8
      [    0.520401] sp : ffff0000098c3b20
      [    0.520590] x29: ffff0000098c3b20 x28: 00000000087a3714
      [    0.520904] x27: 0000000000002000 x26: 0000000000002000
      [    0.521179] x25: ffff000009583000 x24: 0000000000000000
      [    0.521467] x23: ffff80007bb52000 x22: ffff80007bbaa7c0
      [    0.521737] x21: ffff0000093f9338 x20: 0000000000000000
      [    0.522033] x19: ffff80007bbb05d8 x18: 0000000000000400
      [    0.522376] x17: 0000000000000000 x16: 0000000000000000
      [    0.522727] x15: 0000000000000400 x14: 0000000000000400
      [    0.523068] x13: 0000000000000001 x12: 0000000000000001
      [    0.523421] x11: 0000000000000000 x10: 0000000000000970
      [    0.523749] x9 : ffff0000098c3a60 x8 : ffff80007bbab190
      [    0.524017] x7 : ffff80007bbaa880 x6 : 0000000000000c88
      [    0.524305] x5 : ffff0000093d96c8 x4 : 61c8864680b583eb
      [    0.524567] x3 : ffff0000093d6180 x2 : ffffffffffffffff
      [    0.524872] x1 : 0000800074c12000 x0 : 0000800074c12000
      [    0.525207] Process kdevtmpfs (pid: 13, stack limit = 0x(____ptrval____))
      [    0.525529] Call trace:
      [    0.525806]  __destroy_inode+0x94/0x2a8
      [    0.526108]  destroy_inode+0x34/0x88
      [    0.526370]  evict+0x144/0x1c8
      [    0.526636]  iput+0x184/0x230
      [    0.526871]  dentry_unlink_inode+0x118/0x130
      [    0.527152]  d_delete+0xd8/0xe0
      [    0.527420]  vfs_unlink+0x240/0x270
      [    0.527665]  handle_remove+0x1d8/0x330
      [    0.527875]  devtmpfsd+0x138/0x1c8
      [    0.528085]  kthread+0x14c/0x158
      [    0.528291]  ret_from_fork+0x10/0x18
      [    0.528720] Code: 92800002 aa1403e0 d538d081 8b010000 (c85f7c04)
      [    0.529367] ---[ end trace 5a3dee47727f877c ]---
      
      Rework to set suppress_bind_attrs flag to avoid removing the device when
      CONFIG_DEBUG_TEST_DRIVER_REMOVE=y. This applies for pic32_uart and
      xilinx_uartps as well.
      Co-developed-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NAnders Roxell <anders.roxell@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      4c7c36a7
    • A
      writeback: don't decrement wb->refcnt if !wb->bdi · e7a5f007
      Anders Roxell 提交于
      [ Upstream commit 347a28b586802d09604a149c1a1f6de5dccbe6fa ]
      
      This happened while running in qemu-system-aarch64, the AMBA PL011 UART
      driver when enabling CONFIG_DEBUG_TEST_DRIVER_REMOVE.
      arch_initcall(pl011_init) came before subsys_initcall(default_bdi_init),
      devtmpfs' handle_remove() crashes because the reference count is a NULL
      pointer only because wb->bdi hasn't been initialized yet.
      
      Rework so that wb_put have an extra check if wb->bdi before decrement
      wb->refcnt and also add a WARN_ON_ONCE to get a warning if it happens again
      in other drivers.
      
      Fixes: 52ebea74 ("writeback: make backing_dev_info host cgroup-specific bdi_writebacks")
      Co-developed-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NAnders Roxell <anders.roxell@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      e7a5f007
    • F
      of: overlay: add missing of_node_put() after add new node to changeset · b6d75422
      Frank Rowand 提交于
      [ Upstream commit 7c528e457d53c75107d5aa56892316d265c778de ]
      
      The refcount of a newly added overlay node decrements to one
      (instead of zero) when the overlay changeset is destroyed.  This
      change will cause the final decrement be to zero.
      
      After applying this patch, new validation warnings will be
      reported from the devicetree unittest during boot due to
      a pre-existing devicetree bug.  The warnings will be similar to:
      
        OF: ERROR: memory leak before free overlay changeset,  /testcase-data/overlay-node/test-bus/test-unittest4
      
      This pre-existing devicetree bug will also trigger a WARN_ONCE() from
      refcount_sub_and_test_checked() when an overlay changeset is
      destroyed without having first been applied.  This scenario occurs
      when an error in the overlay is detected during the overlay changeset
      creation:
      
        WARNING: CPU: 0 PID: 1 at lib/refcount.c:187 refcount_sub_and_test_checked+0xa8/0xbc
        refcount_t: underflow; use-after-free.
      
        (unwind_backtrace) from (show_stack+0x10/0x14)
        (show_stack) from (dump_stack+0x6c/0x8c)
        (dump_stack) from (__warn+0xdc/0x104)
        (__warn) from (warn_slowpath_fmt+0x44/0x6c)
        (warn_slowpath_fmt) from (refcount_sub_and_test_checked+0xa8/0xbc)
        (refcount_sub_and_test_checked) from (kobject_put+0x24/0x208)
        (kobject_put) from (of_changeset_destroy+0x2c/0xb4)
        (of_changeset_destroy) from (free_overlay_changeset+0x1c/0x9c)
        (free_overlay_changeset) from (of_overlay_remove+0x284/0x2cc)
        (of_overlay_remove) from (of_unittest_apply_revert_overlay_check.constprop.4+0xf8/0x1e8)
        (of_unittest_apply_revert_overlay_check.constprop.4) from (of_unittest_overlay+0x960/0xed8)
        (of_unittest_overlay) from (of_unittest+0x1cc4/0x2138)
        (of_unittest) from (do_one_initcall+0x4c/0x28c)
        (do_one_initcall) from (kernel_init_freeable+0x29c/0x378)
        (kernel_init_freeable) from (kernel_init+0x8/0x110)
        (kernel_init) from (ret_from_fork+0x14/0x2c)
      Tested-by: NAlan Tull <atull@kernel.org>
      Signed-off-by: NFrank Rowand <frank.rowand@sony.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      b6d75422
    • Q
      selftests/bpf: enable (uncomment) all tests in test_libbpf.sh · d216d503
      Quentin Monnet 提交于
      [ Upstream commit f96afa767baffba7645f5e10998f5178948bb9aa ]
      
      libbpf is now able to load successfully test_l4lb_noinline.o and
      samples/bpf/tracex3_kern.o.
      
      For the test_l4lb_noinline, uncomment related tests from test_libbpf.c
      and remove the associated "TODO".
      
      For tracex3_kern.o, instead of loading a program from samples/bpf/ that
      might not have been compiled at this stage, try loading a program from
      BPF selftests. Since this test case is about loading a program compiled
      without the "-target bpf" flag, change the Makefile to compile one
      program accordingly (instead of passing the flag for compiling all
      programs).
      
      Regarding test_xdp_noinline.o: in its current shape the program fails to
      load because it provides no version section, but the loader needs one.
      The test was added to make sure that libbpf could load XDP programs even
      if they do not provide a version number in a dedicated section. But
      libbpf is already capable of doing that: in our case loading fails
      because the loader does not know that this is an XDP program (it does
      not need to, since it does not attach the program). So trying to load
      test_xdp_noinline.o does not bring much here: just delete this subtest.
      
      For the record, the error message obtained with tracex3_kern.o was
      fixed by commit e3d91b0c ("tools/libbpf: handle issues with bpf ELF
      objects containing .eh_frames")
      
      I have not been abled to reproduce the "libbpf: incorrect bpf_call
      opcode" error for test_l4lb_noinline.o, even with the version of libbpf
      present at the time when test_libbpf.sh and test_libbpf_open.c were
      created.
      
      RFC -> v1:
      - Compile test_xdp without the "-target bpf" flag, and try to load it
        instead of ../../samples/bpf/tracex3_kern.o.
      - Delete test_xdp_noinline.o subtest.
      
      Cc: Jesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: NQuentin Monnet <quentin.monnet@netronome.com>
      Acked-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Acked-by: NJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      d216d503
    • B
      usb: typec: tcpm: Do not disconnect link for self powered devices · 579f3fc1
      Badhri Jagan Sridharan 提交于
      [ Upstream commit 23b5f73266e59a598c1e5dd435d87651b5a7626b ]
      
      During HARD_RESET the data link is disconnected.
      For self powered device, the spec is advising against doing that.
      
      >From USB_PD_R3_0
      7.1.5 Response to Hard Resets
      Device operation during and after a Hard Reset is defined as follows:
      Self-powered devices Should Not disconnect from USB during a Hard Reset
      (see Section 9.1.2).
      Bus powered devices will disconnect from USB during a Hard Reset due to the
      loss of their power source.
      
      Tackle this by letting TCPM know whether the device is self or bus powered.
      
      This overcomes unnecessary port disconnections from hard reset.
      Also, speeds up the enumeration time when connected to Type-A ports.
      Signed-off-by: NBadhri Jagan Sridharan <badhri@google.com>
      Reviewed-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com>
      ---------
      Version history:
      V3:
      Rebase on top of usb-next
      
      V2:
      Based on feedback from heikki.krogerus@linux.intel.com
      - self_powered added to the struct tcpm_port which is populated from
        a. "connector" node of the device tree in tcpm_fw_get_caps()
        b. "self_powered" node of the tcpc_config in tcpm_copy_caps
      
      Based on feedbase from linux@roeck-us.net
      - Code was refactored
      - SRC_HARD_RESET_VBUS_OFF sets the link state to false based
        on self_powered flag
      
      V1 located here:
      https://lkml.org/lkml/2018/9/13/94Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      579f3fc1
    • M
      e1000e: allow non-monotonic SYSTIM readings · 88f3beae
      Miroslav Lichvar 提交于
      [ Upstream commit e1f65b0d70e9e5c80e15105cd96fa00174d7c436 ]
      
      It seems with some NICs supported by the e1000e driver a SYSTIM reading
      may occasionally be few microseconds before the previous reading and if
      enabled also pass e1000e_sanitize_systim() without reaching the maximum
      number of rereads, even if the function is modified to check three
      consecutive readings (i.e. it doesn't look like a double read error).
      This causes an underflow in the timecounter and the PHC time jumps hours
      ahead.
      
      This was observed on 82574, I217 and I219. The fastest way to reproduce
      it is to run a program that continuously calls the PTP_SYS_OFFSET ioctl
      on the PHC.
      
      Modify e1000e_phc_gettime() to use timecounter_cyc2time() instead of
      timecounter_read() in order to allow non-monotonic SYSTIM readings and
      prevent the PHC from jumping.
      
      Cc: Richard Cochran <richardcochran@gmail.com>
      Signed-off-by: NMiroslav Lichvar <mlichvar@redhat.com>
      Acked-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      88f3beae
    • J
      platform/x86: asus-wmi: Tell the EC the OS will handle the display off hotkey · e5090418
      João Paulo Rechi Vita 提交于
      [ Upstream commit 78f3ac76d9e5219589718b9e4733bee21627b3f5 ]
      
      In the past, Asus firmwares would change the panel backlight directly
      through the EC when the display off hotkey (Fn+F7) was pressed, and
      only notify the OS of such change, with 0x33 when the LCD was ON and
      0x34 when the LCD was OFF. These are currently mapped to
      KEY_DISPLAYTOGGLE and KEY_DISPLAY_OFF, respectively.
      
      Most recently the EC on Asus most machines lost ability to toggle the
      LCD backlight directly, but unless the OS informs the firmware it is
      going to handle the display toggle hotkey events, the firmware still
      tries change the brightness through the EC, to no effect. The end result
      is a long list (at Endless we counted 11) of Asus laptop models where
      the display toggle hotkey does not perform any action. Our firmware
      engineers contacts at Asus were surprised that there were still machines
      out there with the old behavior.
      
      Calling WMNB(ASUS_WMI_DEVID_BACKLIGHT==0x00050011, 2) on the _WDG device
      tells the firmware that it should let the OS handle the display toggle
      event, in which case it will simply notify the OS of a key press with
      0x35, as shown by the DSDT excerpts bellow.
      
       Scope (_SB)
       {
           (...)
      
           Device (ATKD)
           {
               (...)
      
               Name (_WDG, Buffer (0x28)
               {
                   /* 0000 */  0xD0, 0x5E, 0x84, 0x97, 0x6D, 0x4E, 0xDE, 0x11,
                   /* 0008 */  0x8A, 0x39, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66,
                   /* 0010 */  0x4E, 0x42, 0x01, 0x02, 0x35, 0xBB, 0x3C, 0x0B,
                   /* 0018 */  0xC2, 0xE3, 0xED, 0x45, 0x91, 0xC2, 0x4C, 0x5A,
                   /* 0020 */  0x6D, 0x19, 0x5D, 0x1C, 0xFF, 0x00, 0x01, 0x08
               })
               Method (WMNB, 3, Serialized)
               {
                   CreateDWordField (Arg2, Zero, IIA0)
                   CreateDWordField (Arg2, 0x04, IIA1)
                   Local0 = (Arg1 & 0xFFFFFFFF)
      
                   (...)
      
                   If ((Local0 == 0x53564544))
                   {
                       (...)
      
                       If ((IIA0 == 0x00050011))
                       {
                           If ((IIA1 == 0x02))
                           {
                               ^^PCI0.SBRG.EC0.SPIN (0x72, One)
                               ^^PCI0.SBRG.EC0.BLCT = One
                           }
      
                           Return (One)
                       }
                   }
                   (...)
               }
               (...)
           }
           (...)
       }
       (...)
      
       Scope (_SB.PCI0.SBRG.EC0)
       {
           (...)
      
           Name (BLCT, Zero)
      
           (...)
      
           Method (_Q10, 0, NotSerialized)  // _Qxx: EC Query
           {
               If ((BLCT == Zero))
               {
                   Local0 = One
                   Local0 = RPIN (0x72)
                   Local0 ^= One
                   SPIN (0x72, Local0)
                   If (ATKP)
                   {
                       Local0 = (0x34 - Local0)
                       ^^^^ATKD.IANE (Local0)
                   }
               }
               ElseIf ((BLCT == One))
               {
                   If (ATKP)
                   {
                       ^^^^ATKD.IANE (0x35)
                   }
               }
           }
           (...)
       }
      Signed-off-by: NJoão Paulo Rechi Vita <jprvita@endlessm.com>
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      e5090418
    • S
      ixgbe: allow IPsec Tx offload in VEPA mode · 3dc1bc57
      Shannon Nelson 提交于
      [ Upstream commit 7fa57ca443cffe81ce8416b57966bfb0370678a1 ]
      
      When it's possible that the PF might end up trying to send a
      packet to one of its own VFs, we have to forbid IPsec offload
      because the device drops the packets into a black hole.
      See commit 47b6f50077e6 ("ixgbe: disallow IPsec Tx offload
      when in SR-IOV mode") for more info.
      
      This really is only necessary when the device is in the default
      VEB mode.  If instead the device is running in VEPA mode,
      the packets will go through the encryption engine and out the
      MAC/PHY as normal, and get "hairpinned" as needed by the switch.
      
      So let's not block IPsec offload when in VEPA mode.  To get
      there with the ixgbe device, use the handy 'bridge' command:
      	bridge link set dev eth1 hwmode vepa
      Signed-off-by: NShannon Nelson <shannon.nelson@oracle.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      3dc1bc57
    • C
      drm/amdkfd: fix interrupt spin lock · bd240b11
      Christian König 提交于
      [ Upstream commit 2383a767c0ca06f96534456d8313909017c6c8d0 ]
      
      Vega10 has multiple interrupt rings, so this can be called from multiple
      calles at the same time resulting in:
      
      [   71.779334] ================================
      [   71.779406] WARNING: inconsistent lock state
      [   71.779478] 4.19.0-rc1+ #44 Tainted: G        W
      [   71.779565] --------------------------------
      [   71.779637] inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.
      [   71.779740] kworker/6:1/120 [HC0[0]:SC0[0]:HE1:SE1] takes:
      [   71.779832] 00000000ad761971 (&(&kfd->interrupt_lock)->rlock){?...},
      at: kgd2kfd_interrupt+0x75/0x100 [amdgpu]
      [   71.780058] {IN-HARDIRQ-W} state was registered at:
      [   71.780115]   _raw_spin_lock+0x2c/0x40
      [   71.780180]   kgd2kfd_interrupt+0x75/0x100 [amdgpu]
      [   71.780248]   amdgpu_irq_callback+0x6c/0x150 [amdgpu]
      [   71.780315]   amdgpu_ih_process+0x88/0x100 [amdgpu]
      [   71.780380]   amdgpu_irq_handler+0x20/0x40 [amdgpu]
      [   71.780409]   __handle_irq_event_percpu+0x49/0x2a0
      [   71.780436]   handle_irq_event_percpu+0x30/0x70
      [   71.780461]   handle_irq_event+0x37/0x60
      [   71.780484]   handle_edge_irq+0x83/0x1b0
      [   71.780506]   handle_irq+0x1f/0x30
      [   71.780526]   do_IRQ+0x53/0x110
      [   71.780544]   ret_from_intr+0x0/0x22
      [   71.780566]   cpuidle_enter_state+0xaa/0x330
      [   71.780591]   do_idle+0x203/0x280
      [   71.780610]   cpu_startup_entry+0x6f/0x80
      [   71.780634]   start_secondary+0x1b0/0x200
      [   71.780657]   secondary_startup_64+0xa4/0xb0
      
      Fix this by always using irq save spin locks.
      Signed-off-by: NChristian König <christian.koenig@amd.com>
      Acked-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      bd240b11
    • N
      drm/amd/display: Guard against null stream_state in set_crc_source · 07f4cf95
      Nicholas Kazlauskas 提交于
      [ Upstream commit f41a895026b8cb6f765190de7d2e7bc3ccbbd183 ]
      
      [Why]
      
      The igt@kms_plane@pixel-format-pipe tests can create a sequence where
      stream_state is NULL during amdgpu_dm_crtc_set_crc_source which results
      in a null pointer dereference.
      
      [How]
      
      Guard against stream_state being NULL before accessing its fields. This
      doesn't fix the root cause of the issue so a DRM_ERROR is generated
      to still fail the tests.
      Signed-off-by: NNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
      Reviewed-by: NDavid Francis <David.Francis@amd.com>
      Acked-by: NLeo Li <sunpeng.li@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      07f4cf95
    • M
      gpio: pl061: Move irq_chip definition inside struct pl061 · 414dbd6c
      Manivannan Sadhasivam 提交于
      [ Upstream commit ed8dce4c6f726b7f3c6bf40859b92a9e32f189c1 ]
      
      Keeping the irq_chip definition static will make it shared with multiple
      giochips in the system. This practice is considered to be bad and now we
      will get the below warning from gpiolib core:
      
      "detected irqchip that is shared with multiple gpiochips: please fix the
      driver."
      
      Hence, move the irq_chip definition from static to `struct pl061` for
      using a unique irq_chip for each gpiochip.
      Signed-off-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      414dbd6c
    • S
      netfilter: ipset: Allow matching on destination MAC address for mac and ipmac sets · ad7013cd
      Stefano Brivio 提交于
      [ Upstream commit 8cc4ccf58379935f3ad456cc34e61c4e4c921d0e ]
      
      There doesn't seem to be any reason to restrict MAC address
      matching to source MAC addresses in set types bitmap:ipmac,
      hash:ipmac and hash:mac. With this patch, and this setup:
      
        ip netns add A
        ip link add veth1 type veth peer name veth2 netns A
        ip addr add 192.0.2.1/24 dev veth1
        ip -net A addr add 192.0.2.2/24 dev veth2
        ip link set veth1 up
        ip -net A link set veth2 up
      
        ip netns exec A ipset create test hash:mac
        dst=$(ip netns exec A cat /sys/class/net/veth2/address)
        ip netns exec A ipset add test ${dst}
        ip netns exec A iptables -P INPUT DROP
        ip netns exec A iptables -I INPUT -m set --match-set test dst -j ACCEPT
      
      ipset will match packets based on destination MAC address:
      
        # ping -c1 192.0.2.2 >/dev/null
        # echo $?
        0
      Reported-by: NYi Chen <yiche@redhat.com>
      Signed-off-by: NStefano Brivio <sbrivio@redhat.com>
      Signed-off-by: NJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      ad7013cd
    • P
      net: clear skb->tstamp in bridge forwarding path · 18314481
      Paolo Abeni 提交于
      [ Upstream commit 41d1c8839e5f8cb781cc635f12791decee8271b7 ]
      
      Matteo reported forwarding issues inside the linux bridge,
      if the enslaved interfaces use the fq qdisc.
      
      Similar to commit 8203e2d844d3 ("net: clear skb->tstamp in
      forwarding paths"), we need to clear the tstamp field in
      the bridge forwarding path.
      
      Fixes: 80b14dee ("net: Add a new socket option for a future transmit time.")
      Fixes: fb420d5d91c1 ("tcp/fq: move back to CLOCK_MONOTONIC")
      Reported-and-tested-by: NMatteo Croce <mcroce@redhat.com>
      Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
      Acked-by: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Acked-by: NRoopa Prabhu <roopa@cumulusnetworks.com>
      Reviewed-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      18314481
    • D
      ipv6: Take rcu_read_lock in __inet6_bind for mapped addresses · c1fa98a5
      David Ahern 提交于
      [ Upstream commit d4a7e9bb74b5aaf07b89f6531c080b1130bdf019 ]
      
      I realized the last patch calls dev_get_by_index_rcu in a branch not
      holding the rcu lock. Add the calls to rcu_read_lock and rcu_read_unlock.
      
      Fixes: ec90ad334986 ("ipv6: Consider sk_bound_dev_if when binding a socket to a v4 mapped address")
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c1fa98a5
    • K
      r8169: Add support for new Realtek Ethernet · 19ad57e2
      Kai-Heng Feng 提交于
      [ Upstream commit 36352991835ce99e46b4441dd0eb6980f9a83e8f ]
      
      There are two new Realtek Ethernet devices which are re-branded r8168h.
      Add the IDs to to support them.
      Signed-off-by: NKai-Heng Feng <kai.heng.feng@canonical.com>
      Reviewed-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      19ad57e2
    • D
      qmi_wwan: add MTU default to qmap network interface · 8bb38336
      Daniele Palmas 提交于
      [ Upstream commit f87118d5760f00af7228033fbe783c7f380d2866 ]
      
      This patch adds MTU default value to qmap network interface in
      order to avoid "RTNETLINK answers: No buffer space available"
      error when setting an ipv6 address.
      Signed-off-by: NDaniele Palmas <dnlplm@gmail.com>
      Acked-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8bb38336
    • D
      net, skbuff: do not prefer skb allocation fails early · 598e57e0
      David Rientjes 提交于
      [ Upstream commit f8c468e8537925e0c4607263f498a1b7c0c8982e ]
      
      Commit dcda9b04 ("mm, tree wide: replace __GFP_REPEAT by
      __GFP_RETRY_MAYFAIL with more useful semantic") replaced __GFP_REPEAT in
      alloc_skb_with_frags() with __GFP_RETRY_MAYFAIL when the allocation may
      directly reclaim.
      
      The previous behavior would require reclaim up to 1 << order pages for
      skb aligned header_len of order > PAGE_ALLOC_COSTLY_ORDER before failing,
      otherwise the allocations in alloc_skb() would loop in the page allocator
      looking for memory.  __GFP_RETRY_MAYFAIL makes both allocations failable
      under memory pressure, including for the HEAD allocation.
      
      This can cause, among many other things, write() to fail with ENOTCONN
      during RPC when under memory pressure.
      
      These allocations should succeed as they did previous to dcda9b04
      even if it requires calling the oom killer and additional looping in the
      page allocator to find memory.  There is no way to specify the previous
      behavior of __GFP_REPEAT, but it's unlikely to be necessary since the
      previous behavior only guaranteed that 1 << order pages would be reclaimed
      before failing for order > PAGE_ALLOC_COSTLY_ORDER.  That reclaim is not
      guaranteed to be contiguous memory, so repeating for such large orders is
      usually not beneficial.
      
      Removing the setting of __GFP_RETRY_MAYFAIL to restore the previous
      behavior, specifically not allowing alloc_skb() to fail for small orders
      and oom kill if necessary rather than allowing RPCs to fail.
      
      Fixes: dcda9b04 ("mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic")
      Signed-off-by: NDavid Rientjes <rientjes@google.com>
      Reviewed-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      598e57e0
    • A
      net: dsa: mv88x6xxx: mv88e6390 errata · e1041138
      Andrew Lunn 提交于
      [ Upstream commit ea89098ef9a574bceca00d3b5df14aaf0b3f9ccf ]
      
      The 6390 copper ports have an errata which require poking magic values
      into undocumented magic registers and then performing a software
      reset.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e1041138
    • I
      mlxsw: spectrum_switchdev: Set PVID correctly during VLAN deletion · 07348a7e
      Ido Schimmel 提交于
      [ Upstream commit 674bed5df4cab8f96d04f7b99608883a48f9226b ]
      
      When a VLAN is deleted from a bridge port we should not change the PVID
      unless the deleted VLAN is the PVID.
      
      Fixes: fe9ccc78 ("mlxsw: spectrum_switchdev: Don't batch VLAN operations")
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      07348a7e
    • J
      mlxsw: spectrum: Disable lag port TX before removing it · cac1bffc
      Jiri Pirko 提交于
      [ Upstream commit 8adbe212a159d9c78a90fca1d854f6e63452426b ]
      
      Make sure that lag port TX is disabled before mlxsw_sp_port_lag_leave()
      is called and prevent from possible EMAD error.
      
      Fixes: 0d65fc13 ("mlxsw: spectrum: Implement LAG port join/leave")
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cac1bffc
    • D
      ipv6: Consider sk_bound_dev_if when binding a socket to a v4 mapped address · 9b25d7b6
      David Ahern 提交于
      [ Upstream commit ec90ad334986fa5856d11dd272f7f22fa86c55c4 ]
      
      Similar to c5ee066333eb ("ipv6: Consider sk_bound_dev_if when binding a
      socket to an address"), binding a socket to v4 mapped addresses needs to
      consider if the socket is bound to a device.
      
      This problem also exists from the beginning of git history.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9b25d7b6
  2. 23 1月, 2019 17 次提交