1. 22 8月, 2018 6 次提交
  2. 12 8月, 2018 3 次提交
  3. 11 8月, 2018 1 次提交
  4. 09 8月, 2018 5 次提交
  5. 08 8月, 2018 2 次提交
  6. 04 8月, 2018 7 次提交
    • N
      mlxsw: core_acl_flex_actions: Remove redundant mirror resource destruction · caebd1b3
      Nir Dotan 提交于
      In previous patch mlxsw_afa_resource_del() was added to avoid a duplicate
      resource detruction scenario.
      For mirror actions, such duplicate destruction leads to a crash as in:
      
       # tc qdisc add dev swp49 ingress
       # tc filter add dev swp49 parent ffff: \
         protocol ip chain 100 pref 10 \
         flower skip_sw dst_ip 192.168.101.1 action drop
       # tc filter add dev swp49 parent ffff: \
         protocol ip pref 10 \
         flower skip_sw dst_ip 192.168.101.1 action goto chain 100 \
         action mirred egress mirror dev swp4
      
      Therefore add a call to mlxsw_afa_resource_del() in
      mlxsw_afa_mirror_destroy() in order to clear that resource
      from rule's resources.
      
      Fixes: d0d13c18 ("mlxsw: spectrum_acl: Add support for mirror action")
      Signed-off-by: NNir Dotan <nird@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      caebd1b3
    • N
      mlxsw: core_acl_flex_actions: Remove redundant counter destruction · 7cc61694
      Nir Dotan 提交于
      Each tc flower rule uses a hidden count action. As counter resource may
      not be available due to limited HW resources, update _counter_create()
      and _counter_destroy() pair to follow previously introduced symmetric
      error condition handling, add a call to mlxsw_afa_resource_del() as part
      of the counter resource destruction.
      
      Fixes: c18c1e18 ("mlxsw: core: Make counter index allocated inside the action append")
      Signed-off-by: NNir Dotan <nird@mellanox.com>
      Reviewed-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7cc61694
    • N
      mlxsw: core_acl_flex_actions: Remove redundant resource destruction · dda0a3a3
      Nir Dotan 提交于
      Some ACL actions require the allocation of a separate resource
      prior to applying the action itself. When facing an error condition
      during the setup phase of the action, resource should be destroyed.
      For such actions the destruction was done twice which is dangerous
      and lead to a potential crash.
      The destruction took place first upon error on action setup phase
      and then as the rule was destroyed.
      
      The following sequence generated a crash:
      
       # tc qdisc add dev swp49 ingress
       # tc filter add dev swp49 parent ffff: \
         protocol ip chain 100 pref 10 \
         flower skip_sw dst_ip 192.168.101.1 action drop
       # tc filter add dev swp49 parent ffff: \
         protocol ip pref 10 \
         flower skip_sw dst_ip 192.168.101.1 action goto chain 100 \
         action mirred egress mirror dev swp4
      
      Therefore add mlxsw_afa_resource_del() as a complement of
      mlxsw_afa_resource_add() to add symmetry to resource_list membership
      handling. Call this from mlxsw_afa_fwd_entry_ref_destroy() to make the
      _fwd_entry_ref_create() and _fwd_entry_ref_destroy() pair of calls a
      NOP.
      
      Fixes: 140ce421 ("mlxsw: core: Convert fwd_entry_ref list to be generic per-block resource list")
      Signed-off-by: NNir Dotan <nird@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dda0a3a3
    • N
      mlxsw: core_acl_flex_actions: Return error for conflicting actions · 3757b255
      Nir Dotan 提交于
      Spectrum switch ACL action set is built in groups of three actions
      which may point to additional actions. A group holds a single record
      which can be set as goto record for pointing at a following group
      or can be set to mark the termination of the lookup. This is perfectly
      adequate for handling a series of actions to be executed on a packet.
      While the SW model allows configuration of conflicting actions
      where it is clear that some actions will never execute, the mlxsw
      driver must block such configurations as it creates a conflict
      over the single terminate/goto record value.
      
      For a conflicting actions configuration such as:
      
       # tc filter add dev swp49 parent ffff: \
         protocol ip pref 10 \
         flower skip_sw dst_ip 192.168.101.1 \
         action goto chain 100 \
         action mirred egress mirror dev swp4
      
      Where it is clear that the last action will never execute, the
      mlxsw driver was issuing a warning instead of returning an error.
      Therefore replace that warning with an error for this specific
      case.
      
      Fixes: 4cda7d8d ("mlxsw: core: Introduce flexible actions support")
      Signed-off-by: NNir Dotan <nird@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3757b255
    • J
      scsi: vmw_pvscsi: Return DID_RESET for status SAM_STAT_COMMAND_TERMINATED · e95153b6
      Jim Gill 提交于
      Commands that are reset are returned with status
      SAM_STAT_COMMAND_TERMINATED. PVSCSI currently returns DID_OK |
      SAM_STAT_COMMAND_TERMINATED which fails the command. Instead, set hostbyte
      to DID_RESET to allow upper layers to retry.
      
      Tested by copying a large file between two pvscsi disks on same adapter
      while performing a bus reset at 1-second intervals. Before fix, commands
      sometimes fail with DID_OK. After fix, commands observed to fail with
      DID_RESET.
      Signed-off-by: NJim Gill <jgill@vmware.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      e95153b6
    • B
      scsi: sr: Avoid that opening a CD-ROM hangs with runtime power management enabled · 1214fd7b
      Bart Van Assche 提交于
      Surround scsi_execute() calls with scsi_autopm_get_device() and
      scsi_autopm_put_device(). Note: removing sr_mutex protection from the
      scsi_cd_get() and scsi_cd_put() calls is safe because the purpose of
      sr_mutex is to serialize cdrom_*() calls.
      
      This patch avoids that complaints similar to the following appear in the
      kernel log if runtime power management is enabled:
      
      INFO: task systemd-udevd:650 blocked for more than 120 seconds.
           Not tainted 4.18.0-rc7-dbg+ #1
      "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
      systemd-udevd   D28176   650    513 0x00000104
      Call Trace:
      __schedule+0x444/0xfe0
      schedule+0x4e/0xe0
      schedule_preempt_disabled+0x18/0x30
      __mutex_lock+0x41c/0xc70
      mutex_lock_nested+0x1b/0x20
      __blkdev_get+0x106/0x970
      blkdev_get+0x22c/0x5a0
      blkdev_open+0xe9/0x100
      do_dentry_open.isra.19+0x33e/0x570
      vfs_open+0x7c/0xd0
      path_openat+0x6e3/0x1120
      do_filp_open+0x11c/0x1c0
      do_sys_open+0x208/0x2d0
      __x64_sys_openat+0x59/0x70
      do_syscall_64+0x77/0x230
      entry_SYSCALL_64_after_hwframe+0x49/0xbe
      Signed-off-by: NBart Van Assche <bart.vanassche@wdc.com>
      Cc: Maurizio Lombardi <mlombard@redhat.com>
      Cc: Johannes Thumshirn <jthumshirn@suse.de>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: <stable@vger.kernel.org>
      Tested-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      1214fd7b
    • S
      scsi: mpt3sas: Swap I/O memory read value back to cpu endianness · 09c2f95a
      Sreekanth Reddy 提交于
      Swap the I/O memory read value back to cpu endianness before storing it in
      a data structures which are defined in the MPI headers where u8 components
      are not defined in the endianness order.
      
      In this area from day one mpt3sas driver is using le32_to_cpu() &
      cpu_to_le32() APIs. But in commit cf6bf971
      (mpt3sas: Bug fix for big endian systems) we have removed these APIs
      before reading I/O memory which we should haven't done it. So
      in this patch I am correcting it by adding these APIs back
      before accessing I/O memory.
      Signed-off-by: NSreekanth Reddy <sreekanth.reddy@broadcom.com>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      09c2f95a
  7. 03 8月, 2018 4 次提交
    • C
      drivers: net: lmc: fix case value for target abort error · afb41bb0
      Colin Ian King 提交于
      Current value for a target abort error is 0x010, however, this value
      should in fact be 0x002.  As it stands, the range of error is 0..7 so
      it is currently never being detected.  This bug has been in the driver
      since the early 2.6.12 days (or before).
      
      Detected by CoverityScan, CID#744290 ("Logically dead code")
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      afb41bb0
    • J
      scsi: fcoe: clear FC_RP_STARTED flags when receiving a LOGO · 1550ec45
      Johannes Thumshirn 提交于
      When receiving a LOGO request we forget to clear the FC_RP_STARTED flag
      before starting the rport delete routine.
      
      As the started flag was not cleared, we're not deleting the rport but
      waiting for a restart and thus are keeping the reference count of the rdata
      object at 1.
      
      This leads to the following kmemleak report:
      unreferenced object 0xffff88006542aa00 (size 512):
        comm "kworker/0:2", pid 24, jiffies 4294899222 (age 226.880s)
        hex dump (first 32 bytes):
          68 96 fe 65 00 88 ff ff 00 00 00 00 00 00 00 00  h..e............
          01 00 00 00 08 00 00 00 02 c5 45 24 ac b8 00 10  ..........E$....
        backtrace:
          [<(____ptrval____)>] fcoe_ctlr_vn_add.isra.5+0x7f/0x770 [libfcoe]
          [<(____ptrval____)>] fcoe_ctlr_vn_recv+0x12af/0x27f0 [libfcoe]
          [<(____ptrval____)>] fcoe_ctlr_recv_work+0xd01/0x32f0 [libfcoe]
          [<(____ptrval____)>] process_one_work+0x7ff/0x1420
          [<(____ptrval____)>] worker_thread+0x87/0xef0
          [<(____ptrval____)>] kthread+0x2db/0x390
          [<(____ptrval____)>] ret_from_fork+0x35/0x40
          [<(____ptrval____)>] 0xffffffffffffffff
      Signed-off-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Reported-by: Nard <ard@kwaak.net>
      Reviewed-by: NHannes Reinecke <hare@suse.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      1550ec45
    • J
      scsi: fcoe: drop frames in ELS LOGO error path · 63d0e3df
      Johannes Thumshirn 提交于
      Drop the frames in the ELS LOGO error path instead of just returning an
      error.
      
      This fixes the following kmemleak report:
      unreferenced object 0xffff880064cb1000 (size 424):
        comm "kworker/0:2", pid 24, jiffies 4294904293 (age 68.504s)
        hex dump (first 32 bytes):
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        backtrace:
          [<(____ptrval____)>] _fc_frame_alloc+0x2c/0x180 [libfc]
          [<(____ptrval____)>] fc_lport_enter_logo+0x106/0x360 [libfc]
          [<(____ptrval____)>] fc_fabric_logoff+0x8c/0xc0 [libfc]
          [<(____ptrval____)>] fcoe_if_destroy+0x79/0x3b0 [fcoe]
          [<(____ptrval____)>] fcoe_destroy_work+0xd2/0x170 [fcoe]
          [<(____ptrval____)>] process_one_work+0x7ff/0x1420
          [<(____ptrval____)>] worker_thread+0x87/0xef0
          [<(____ptrval____)>] kthread+0x2db/0x390
          [<(____ptrval____)>] ret_from_fork+0x35/0x40
          [<(____ptrval____)>] 0xffffffffffffffff
      
      which can be triggered by issuing
      echo eth0 > /sys/bus/fcoe/ctlr_destroy
      Signed-off-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Reviewed-by: NHannes Reinecke <hare@suse.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      63d0e3df
    • J
      scsi: fcoe: fix use-after-free in fcoe_ctlr_els_send · 2d7d4fd3
      Johannes Thumshirn 提交于
      KASAN reports a use-after-free in fcoe_ctlr_els_send() when we're sending a
      LOGO and have FIP debugging enabled. This is because we're first freeing
      the skb and then printing the frame's DID. But the DID is a member of the
      FC frame header which in turn is the skb's payload.
      
      Exchange the debug print and kfree_skb() calls so we're not touching the
      freed data.
      Signed-off-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Reviewed-by: NHannes Reinecke <hare@suse.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      2d7d4fd3
  8. 02 8月, 2018 3 次提交
    • J
      staging: ashmem: Fix SIGBUS crash when traversing mmaped ashmem pages · 44960f2a
      John Stultz 提交于
      Amit Pundir and Youling in parallel reported crashes with recent
      mainline kernels running Android:
      
        F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
        F DEBUG   : Build fingerprint: 'Android/db410c32_only/db410c32_only:Q/OC-MR1/102:userdebug/test-key
        F DEBUG   : Revision: '0'
        F DEBUG   : ABI: 'arm'
        F DEBUG   : pid: 2261, tid: 2261, name: zygote  >>> zygote <<<
        F DEBUG   : signal 7 (SIGBUS), code 2 (BUS_ADRERR), fault addr 0xec00008
        ... <snip> ...
        F DEBUG   : backtrace:
        F DEBUG   :     #00 pc 00001c04  /system/lib/libc.so (memset+48)
        F DEBUG   :     #1 pc 0010c513  /system/lib/libart.so (create_mspace_with_base+82)
        F DEBUG   :     #2 pc 0015c601  /system/lib/libart.so (art::gc::space::DlMallocSpace::CreateMspace(void*, unsigned int, unsigned int)+40)
        F DEBUG   :     #3 pc 0015c3ed  /system/lib/libart.so (art::gc::space::DlMallocSpace::CreateFromMemMap(art::MemMap*, std::__1::basic_string<char, std::__ 1::char_traits<char>, std::__1::allocator<char>> const&, unsigned int, unsigned int, unsigned int, unsigned int, bool)+36)
        ...
      
      This was bisected back to commit bfd40eaf ("mm: fix
      vma_is_anonymous() false-positives").
      
      create_mspace_with_base() in the trace above, utilizes ashmem, and with
      ashmem, for shared mappings we use shmem_zero_setup(), which sets the
      vma->vm_ops to &shmem_vm_ops.  But for private ashmem mappings nothing
      sets the vma->vm_ops.
      
      Looking at the problematic patch, it seems to add a requirement that one
      call vma_set_anonymous() on a vma, otherwise the dummy_vm_ops will be
      used.  Using the dummy_vm_ops seem to triggger SIGBUS when traversing
      unmapped pages.
      
      Thus, this patch adds a call to vma_set_anonymous() for ashmem private
      mappings and seems to avoid the reported problem.
      
      Fixes: bfd40eaf ("mm: fix vma_is_anonymous() false-positives")
      Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Joel Fernandes <joelaf@google.com>
      Cc: Colin Cross <ccross@google.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Reported-by: NAmit Pundir <amit.pundir@linaro.org>
      Reported-by: NYouling 257 <youling257@gmail.com>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      44960f2a
    • J
      net: stmmac: Fix WoL for PCI-based setups · b7d0f08e
      Jose Abreu 提交于
      WoL won't work in PCI-based setups because we are not saving the PCI EP
      state before entering suspend state and not allowing D3 wake.
      
      Fix this by using a wrapper around stmmac_{suspend/resume} which
      correctly sets the PCI EP state.
      Signed-off-by: NJose Abreu <joabreu@synopsys.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Joao Pinto <jpinto@synopsys.com>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b7d0f08e
    • E
      bonding: avoid lockdep confusion in bond_get_stats() · 7e2556e4
      Eric Dumazet 提交于
      syzbot found that the following sequence produces a LOCKDEP splat [1]
      
      ip link add bond10 type bond
      ip link add bond11 type bond
      ip link set bond11 master bond10
      
      To fix this, we can use the already provided nest_level.
      
      This patch also provides correct nesting for dev->addr_list_lock
      
      [1]
      WARNING: possible recursive locking detected
      4.18.0-rc6+ #167 Not tainted
      --------------------------------------------
      syz-executor751/4439 is trying to acquire lock:
      (____ptrval____) (&(&bond->stats_lock)->rlock){+.+.}, at: spin_lock include/linux/spinlock.h:310 [inline]
      (____ptrval____) (&(&bond->stats_lock)->rlock){+.+.}, at: bond_get_stats+0xb4/0x560 drivers/net/bonding/bond_main.c:3426
      
      but task is already holding lock:
      (____ptrval____) (&(&bond->stats_lock)->rlock){+.+.}, at: spin_lock include/linux/spinlock.h:310 [inline]
      (____ptrval____) (&(&bond->stats_lock)->rlock){+.+.}, at: bond_get_stats+0xb4/0x560 drivers/net/bonding/bond_main.c:3426
      
      other info that might help us debug this:
       Possible unsafe locking scenario:
      
             CPU0
             ----
        lock(&(&bond->stats_lock)->rlock);
        lock(&(&bond->stats_lock)->rlock);
      
       *** DEADLOCK ***
      
       May be due to missing lock nesting notation
      
      3 locks held by syz-executor751/4439:
       #0: (____ptrval____) (rtnl_mutex){+.+.}, at: rtnl_lock+0x17/0x20 net/core/rtnetlink.c:77
       #1: (____ptrval____) (&(&bond->stats_lock)->rlock){+.+.}, at: spin_lock include/linux/spinlock.h:310 [inline]
       #1: (____ptrval____) (&(&bond->stats_lock)->rlock){+.+.}, at: bond_get_stats+0xb4/0x560 drivers/net/bonding/bond_main.c:3426
       #2: (____ptrval____) (rcu_read_lock){....}, at: bond_get_stats+0x0/0x560 include/linux/compiler.h:215
      
      stack backtrace:
      CPU: 0 PID: 4439 Comm: syz-executor751 Not tainted 4.18.0-rc6+ #167
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      Call Trace:
       __dump_stack lib/dump_stack.c:77 [inline]
       dump_stack+0x1c9/0x2b4 lib/dump_stack.c:113
       print_deadlock_bug kernel/locking/lockdep.c:1765 [inline]
       check_deadlock kernel/locking/lockdep.c:1809 [inline]
       validate_chain kernel/locking/lockdep.c:2405 [inline]
       __lock_acquire.cold.64+0x1fb/0x486 kernel/locking/lockdep.c:3435
       lock_acquire+0x1e4/0x540 kernel/locking/lockdep.c:3924
       __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
       _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144
       spin_lock include/linux/spinlock.h:310 [inline]
       bond_get_stats+0xb4/0x560 drivers/net/bonding/bond_main.c:3426
       dev_get_stats+0x10f/0x470 net/core/dev.c:8316
       bond_get_stats+0x232/0x560 drivers/net/bonding/bond_main.c:3432
       dev_get_stats+0x10f/0x470 net/core/dev.c:8316
       rtnl_fill_stats+0x4d/0xac0 net/core/rtnetlink.c:1169
       rtnl_fill_ifinfo+0x1aa6/0x3fb0 net/core/rtnetlink.c:1611
       rtmsg_ifinfo_build_skb+0xc8/0x190 net/core/rtnetlink.c:3268
       rtmsg_ifinfo_event.part.30+0x45/0xe0 net/core/rtnetlink.c:3300
       rtmsg_ifinfo_event net/core/rtnetlink.c:3297 [inline]
       rtnetlink_event+0x144/0x170 net/core/rtnetlink.c:4716
       notifier_call_chain+0x180/0x390 kernel/notifier.c:93
       __raw_notifier_call_chain kernel/notifier.c:394 [inline]
       raw_notifier_call_chain+0x2d/0x40 kernel/notifier.c:401
       call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1735
       call_netdevice_notifiers net/core/dev.c:1753 [inline]
       netdev_features_change net/core/dev.c:1321 [inline]
       netdev_change_features+0xb3/0x110 net/core/dev.c:7759
       bond_compute_features.isra.47+0x585/0xa50 drivers/net/bonding/bond_main.c:1120
       bond_enslave+0x1b25/0x5da0 drivers/net/bonding/bond_main.c:1755
       bond_do_ioctl+0x7cb/0xae0 drivers/net/bonding/bond_main.c:3528
       dev_ifsioc+0x43c/0xb30 net/core/dev_ioctl.c:327
       dev_ioctl+0x1b5/0xcc0 net/core/dev_ioctl.c:493
       sock_do_ioctl+0x1d3/0x3e0 net/socket.c:992
       sock_ioctl+0x30d/0x680 net/socket.c:1093
       vfs_ioctl fs/ioctl.c:46 [inline]
       file_ioctl fs/ioctl.c:500 [inline]
       do_vfs_ioctl+0x1de/0x1720 fs/ioctl.c:684
       ksys_ioctl+0xa9/0xd0 fs/ioctl.c:701
       __do_sys_ioctl fs/ioctl.c:708 [inline]
       __se_sys_ioctl fs/ioctl.c:706 [inline]
       __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:706
       do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
       entry_SYSCALL_64_after_hwframe+0x49/0xbe
      RIP: 0033:0x440859
      Code: e8 2c af 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 3b 10 fc ff c3 66 2e 0f 1f 84 00 00 00 00
      RSP: 002b:00007ffc51a92878 EFLAGS: 00000213 ORIG_RAX: 0000000000000010
      RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000440859
      RDX: 0000000020000040 RSI: 0000000000008990 RDI: 0000000000000003
      RBP: 0000000000000000 R08: 00000000004002c8 R09: 00000000004002c8
      R10: 00000000022d5880 R11: 0000000000000213 R12: 0000000000007390
      R13: 0000000000401db0 R14: 0000000000000000 R15: 0000000000000000
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Jay Vosburgh <j.vosburgh@gmail.com>
      Cc: Veaceslav Falico <vfalico@gmail.com>
      Cc: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7e2556e4
  9. 01 8月, 2018 8 次提交
    • B
      gpiolib-acpi: make sure we trigger edge events at least once on boot · ca876c74
      Benjamin Tissoires 提交于
      On some systems using edge triggered ACPI Event Interrupts, the initial
      state at boot is not setup by the firmware, instead relying on the edge
      irq event handler running at least once to setup the initial state.
      
      2 known examples of this are:
      
      1) The Surface 3 has its _LID state controlled by an ACPI operation region
       triggered by a GPIO event:
      
       OperationRegion (GPOR, GeneralPurposeIo, Zero, One)
       Field (GPOR, ByteAcc, NoLock, Preserve)
       {
           Connection (
               GpioIo (Shared, PullNone, 0x0000, 0x0000, IoRestrictionNone,
                   "\\_SB.GPO0", 0x00, ResourceConsumer, ,
                   )
                   {   // Pin list
                       0x004C
                   }
           ),
           HELD,   1
       }
      
       Method (_E4C, 0, Serialized)  // _Exx: Edge-Triggered GPE
       {
           If ((HELD == One))
           {
               ^^LID.LIDB = One
           }
           Else
           {
               ^^LID.LIDB = Zero
               Notify (LID, 0x80) // Status Change
           }
      
           Notify (^^PCI0.SPI1.NTRG, One) // Device Check
       }
      
       Currently, the state of LIDB is wrong until the user actually closes or
       open the cover. We need to trigger the GPIO event once to update the
       internal ACPI state.
      
       Coincidentally, this also enables the Surface 2 integrated HID sensor hub
       which also requires an ACPI gpio operation region to start initialization.
      
      2) Various Bay Trail based tablets come with an external USB mux and
       TI T1210B USB phy to enable USB gadget mode. The mux is controlled by a
       GPIO which is controlled by an edge triggered ACPI Event Interrupt which
       monitors the micro-USB ID pin.
      
       When the tablet is connected to a PC (or no cable is plugged in), the ID
       pin is high and the tablet should be in gadget mode. But the GPIO
       controlling the mux is initialized by the firmware so that the USB data
       lines are muxed to the host controller.
      
       This means that if the user wants to use gadget mode, the user needs to
       first plug in a host-cable to force the ID pin low and then unplug it
       and connect the tablet to a PC, to get the ACPI event handler to run and
       switch the mux to device mode,
      
      This commit fixes both by running the event-handler once on boot.
      
      Note that the running of the event-handler is done from a late_initcall,
      this is done because the handler AML code may rely on OperationRegions
      registered by other builtin drivers. This avoids errors like these:
      
      [    0.133026] ACPI Error: No handler for Region [XSCG] ((____ptrval____)) [GenericSerialBus] (20180531/evregion-132)
      [    0.133036] ACPI Error: Region GenericSerialBus (ID=9) has no handler (20180531/exfldio-265)
      [    0.133046] ACPI Error: Method parse/execution failed \_SB.GPO2._E12, AE_NOT_EXIST (20180531/psparse-516)
      Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      [hdegoede: Document BYT USB mux reliance on initial trigger]
      [hdegoede: Run event handler from a late_initcall, rather then immediately]
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      ca876c74
    • G
      enic: do not call enic_change_mtu in enic_probe · cb5c6568
      Govindarajulu Varadarajan 提交于
      In commit ab123fe0 ("enic: handle mtu change for vf properly")
      ASSERT_RTNL() is added to _enic_change_mtu() to prevent it from being
      called without rtnl held. enic_probe() calls enic_change_mtu()
      without rtnl held. At this point netdev is not registered yet.
      Remove call to enic_change_mtu and assign the mtu to netdev->mtu.
      
      Fixes: ab123fe0 ("enic: handle mtu change for vf properly")
      Signed-off-by: NGovindarajulu Varadarajan <gvaradar@cisco.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cb5c6568
    • F
      net/mlx5e: IPoIB, Set the netdevice sw mtu in ipoib enhanced flow · 8e1d162d
      Feras Daoud 提交于
      After introduction of the cited commit, mlx5e_build_nic_params
      receives the netdevice mtu in order to set the sw_mtu of mlx5e_params.
      For enhanced IPoIB, the netdevice mtu is not set in this stage,
      therefore, the initial sw_mtu equals zero. As a result, the hw_mtu
      of the receive queue will be calculated incorrectly causing traffic
      issues.
      
      To fix this issue, query for port mtu before building the nic params.
      
      Fixes: 472a1e44 ("net/mlx5e: Save MTU in channels params")
      Signed-off-by: NFeras Daoud <ferasda@mellanox.com>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      8e1d162d
    • A
      net/mlx5e: Fix null pointer access when setting MTU of vport representor · eacecf27
      Adi Nissim 提交于
      MTU helper function is used by both conventional mlx5e
      instances (PF/VF) and the eswitch representors. The representor
      shouldn't change the nic vport context MTU, the VF is responsible for
      that. Therefore set_mtu_cb has a null value when changing the
      representor MTU.
      
      Fixes: 250a42b6 ("net/mlx5e: Support configurable MTU for vport representors")
      Signed-off-by: NAdi Nissim <adin@mellanox.com>
      Reviewed-by: NYevgeny Kliteynik <kliteyn@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      eacecf27
    • O
      net/mlx5e: Set port trust mode to PCP as default · 2e8e70d2
      Or Gerlitz 提交于
      The hairpin offload code has dependency on the trust mode being PCP.
      
      Hence we should set PCP as the default for handling cases where we are
      disallowed to read the trust mode from the FW, or failed to initialize it.
      
      Fixes: 106be53b ('net/mlx5e: Set per priority hairpin pairs')
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Reviewed-by: NParav Pandit <parav@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      2e8e70d2
    • E
      net/mlx5e: E-Switch, Initialize eswitch only if eswitch manager · 5f5991f3
      Eli Cohen 提交于
      Execute mlx5_eswitch_init() only if we have MLX5_ESWITCH_MANAGER
      capabilities.
      Do the same for mlx5_eswitch_cleanup().
      
      Fixes: a9f7705f ("net/mlx5: Unify vport manager capability check")
      Signed-off-by: NEli Cohen <eli@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      5f5991f3
    • A
      net: dsa: mv88e6xxx: Fix SERDES support on 88E6141/6341 · 6751e7c6
      Andrew Lunn 提交于
      Version 1 of the patch adding SERDES support to the 88E6141/6341
      correctly added the ops to the 88E6141/6341. However, by the time
      version 3 was committed, the ops had moved to the 88E6085/6175. Put
      them back where they belong.
      
      Fixes: 5bafeb6e ("net: dsa: mv88e6xxx: 88E6141/6341 SERDES support")
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6751e7c6
    • H
      PCI: Fix is_added/is_busmaster race condition · 44bda4b7
      Hari Vyas 提交于
      When a PCI device is detected, pdev->is_added is set to 1 and proc and
      sysfs entries are created.
      
      When the device is removed, pdev->is_added is checked for one and then
      device is detached with clearing of proc and sys entries and at end,
      pdev->is_added is set to 0.
      
      is_added and is_busmaster are bit fields in pci_dev structure sharing same
      memory location.
      
      A strange issue was observed with multiple removal and rescan of a PCIe
      NVMe device using sysfs commands where is_added flag was observed as zero
      instead of one while removing device and proc,sys entries are not cleared.
      This causes issue in later device addition with warning message
      "proc_dir_entry" already registered.
      
      Debugging revealed a race condition between the PCI core setting the
      is_added bit in pci_bus_add_device() and the NVMe driver reset work-queue
      setting the is_busmaster bit in pci_set_master().  As these fields are not
      handled atomically, that clears the is_added bit.
      
      Move the is_added bit to a separate private flag variable and use atomic
      functions to set and retrieve the device addition state.  This avoids the
      race because is_added no longer shares a memory location with is_busmaster.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=200283Signed-off-by: NHari Vyas <hari.vyas@broadcom.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NLukas Wunner <lukas@wunner.de>
      Acked-by: NMichael Ellerman <mpe@ellerman.id.au>
      44bda4b7
  10. 31 7月, 2018 1 次提交