1. 11 4月, 2018 1 次提交
  2. 04 4月, 2018 1 次提交
    • A
      lan78xx: Connect phy early · 92571a1a
      Alexander Graf 提交于
      When using wicked with a lan78xx device attached to the system, we
      end up with ethtool commands issued on the device before an ifup
      got issued. That lead to the following crash:
      
          Unable to handle kernel NULL pointer dereference at virtual address 0000039c
          pgd = ffff800035b30000
          [0000039c] *pgd=0000000000000000
          Internal error: Oops: 96000004 [#1] SMP
          Modules linked in: [...]
          Supported: Yes
          CPU: 3 PID: 638 Comm: wickedd Tainted: G            E      4.12.14-0-default #1
          Hardware name: raspberrypi rpi/rpi, BIOS 2018.03-rc2 02/21/2018
          task: ffff800035e74180 task.stack: ffff800036718000
          PC is at phy_ethtool_ksettings_get+0x20/0x98
          LR is at lan78xx_get_link_ksettings+0x44/0x60 [lan78xx]
          pc : [<ffff0000086f7f30>] lr : [<ffff000000dcca84>] pstate: 20000005
          sp : ffff80003671bb20
          x29: ffff80003671bb20 x28: ffff800035e74180
          x27: ffff000008912000 x26: 000000000000001d
          x25: 0000000000000124 x24: ffff000008f74d00
          x23: 0000004000114809 x22: 0000000000000000
          x21: ffff80003671bbd0 x20: 0000000000000000
          x19: ffff80003671bbd0 x18: 000000000000040d
          x17: 0000000000000001 x16: 0000000000000000
          x15: 0000000000000000 x14: ffffffffffffffff
          x13: 0000000000000000 x12: 0000000000000020
          x11: 0101010101010101 x10: fefefefefefefeff
          x9 : 7f7f7f7f7f7f7f7f x8 : fefefeff31677364
          x7 : 0000000080808080 x6 : ffff80003671bc9c
          x5 : ffff80003671b9f8 x4 : ffff80002c296190
          x3 : 0000000000000000 x2 : 0000000000000000
          x1 : ffff80003671bbd0 x0 : ffff80003671bc00
          Process wickedd (pid: 638, stack limit = 0xffff800036718000)
          Call trace:
          Exception stack(0xffff80003671b9e0 to 0xffff80003671bb20)
          b9e0: ffff80003671bc00 ffff80003671bbd0 0000000000000000 0000000000000000
          ba00: ffff80002c296190 ffff80003671b9f8 ffff80003671bc9c 0000000080808080
          ba20: fefefeff31677364 7f7f7f7f7f7f7f7f fefefefefefefeff 0101010101010101
          ba40: 0000000000000020 0000000000000000 ffffffffffffffff 0000000000000000
          ba60: 0000000000000000 0000000000000001 000000000000040d ffff80003671bbd0
          ba80: 0000000000000000 ffff80003671bbd0 0000000000000000 0000004000114809
          baa0: ffff000008f74d00 0000000000000124 000000000000001d ffff000008912000
          bac0: ffff800035e74180 ffff80003671bb20 ffff000000dcca84 ffff80003671bb20
          bae0: ffff0000086f7f30 0000000020000005 ffff80002c296000 ffff800035223900
          bb00: 0000ffffffffffff 0000000000000000 ffff80003671bb20 ffff0000086f7f30
          [<ffff0000086f7f30>] phy_ethtool_ksettings_get+0x20/0x98
          [<ffff000000dcca84>] lan78xx_get_link_ksettings+0x44/0x60 [lan78xx]
          [<ffff0000087cbc40>] ethtool_get_settings+0x68/0x210
          [<ffff0000087cc0d4>] dev_ethtool+0x214/0x2180
          [<ffff0000087e5008>] dev_ioctl+0x400/0x630
          [<ffff00000879dd00>] sock_do_ioctl+0x70/0x88
          [<ffff00000879f5f8>] sock_ioctl+0x208/0x368
          [<ffff0000082cde10>] do_vfs_ioctl+0xb0/0x848
          [<ffff0000082ce634>] SyS_ioctl+0x8c/0xa8
          Exception stack(0xffff80003671bec0 to 0xffff80003671c000)
          bec0: 0000000000000009 0000000000008946 0000fffff4e841d0 0000aa0032687465
          bee0: 0000aaaafa2319d4 0000fffff4e841d4 0000000032687465 0000000032687465
          bf00: 000000000000001d 7f7fff7f7f7f7f7f 72606b622e71ff4c 7f7f7f7f7f7f7f7f
          bf20: 0101010101010101 0000000000000020 ffffffffffffffff 0000ffff7f510c68
          bf40: 0000ffff7f6a9d18 0000ffff7f44ce30 000000000000040d 0000ffff7f6f98f0
          bf60: 0000fffff4e842c0 0000000000000001 0000aaaafa2c2e00 0000ffff7f6ab000
          bf80: 0000fffff4e842c0 0000ffff7f62a000 0000aaaafa2b9f20 0000aaaafa2c2e00
          bfa0: 0000fffff4e84818 0000fffff4e841a0 0000ffff7f5ad0cc 0000fffff4e841a0
          bfc0: 0000ffff7f44ce3c 0000000080000000 0000000000000009 000000000000001d
          bfe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      
      The culprit is quite simple: The driver tries to access the phy left and right,
      but only actually has a working reference to it when the device is up.
      
      The fix thus is quite simple too: Get a reference to the phy on probe already
      and keep it even when the device is going down.
      
      With this patch applied, I can successfully run wicked on my system and bring
      the interface up and down as many times as I want, without getting NULL pointer
      dereferences in between.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      92571a1a
  3. 29 3月, 2018 1 次提交
  4. 26 3月, 2018 1 次提交
  5. 02 2月, 2018 1 次提交
  6. 17 1月, 2018 1 次提交
  7. 18 10月, 2017 1 次提交
    • K
      net: usb: Convert timers to use timer_setup() · d28bb967
      Kees Cook 提交于
      In preparation for unconditionally passing the struct timer_list pointer to
      all timer callbacks, switch to using the new timer_setup() and from_timer()
      to pass the timer pointer explicitly.
      
      Cc: Woojung Huh <woojung.huh@microchip.com>
      Cc: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Philippe Reynes <tremyfr@gmail.com>
      Cc: Jarod Wilson <jarod@redhat.com>
      Cc: Arvind Yadav <arvind.yadav.cs@gmail.com>
      Cc: "Bjørn Mork" <bjorn@mork.no>
      Cc: "Stefan Brüns" <stefan.bruens@rwth-aachen.de>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Greg Ungerer <gerg@linux-m68k.org>
      Cc: linux-usb@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d28bb967
  8. 22 9月, 2017 3 次提交
  9. 03 8月, 2017 2 次提交
  10. 14 6月, 2017 1 次提交
  11. 22 4月, 2017 1 次提交
  12. 29 3月, 2017 1 次提交
  13. 23 3月, 2017 1 次提交
  14. 11 2月, 2017 1 次提交
  15. 09 12月, 2016 1 次提交
  16. 06 12月, 2016 1 次提交
  17. 19 11月, 2016 1 次提交
  18. 16 11月, 2016 1 次提交
  19. 03 11月, 2016 1 次提交
  20. 21 10月, 2016 1 次提交
    • J
      net: use core MTU range checking in USB NIC drivers · f77f0aee
      Jarod Wilson 提交于
      usbnet:
      - Remove stale new_mtu <= 0 check in usbnet.c
      - Set min_mtu = 0, max_mtu = 65535 (sub-drivers must set their own
        max_mtu and/or min_mtu as needed)
      
      r8152:
      - Set appropriate max_mtu for different variants (1500 or 9194)
      
      lan78xx:
      - Set max_mtu = 9000
      
      asix_driver:
      - max_mtu = 16384 for ax88178 variant
      
      ax88179:
      - max_mtu = 4088
      
      cdc_ncm:
      - max_mtu from hardware
      
      cdc-phonet:
      - min_mtu = 6, max_mtu = 65541
      
      sierra_net:
      - max_mtu = 1500, call usbnet_change_mtu directly
      - sierra_net_change_mtu checked for MTU > 1500, then called
        usbnet_change_mtu, but if we set max_mtu to let the network core handle
        the range check, then we can simply call usbnet_change_mtu directly
      
      smsc75xx:
      - max_mtu = 9000
      
      CC: netdev@vger.kernel.org
      CC: Woojung Huh <woojung.huh@microchip.com>
      CC: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
      CC: Hayes Wang <hayeswang@realtek.com>
      CC: Oliver Neukum <oneukum@suse.com>
      CC: Steve Glendinning <steve.glendinning@shawell.net>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f77f0aee
  21. 12 10月, 2016 1 次提交
  22. 07 9月, 2016 1 次提交
    • B
      lan78xx: mark symbols static where possible · e0c79ff6
      Baoyou Xie 提交于
      We get a few warnings when building kernel with W=1:
      drivers/net/usb/lan78xx.c:1182:6: warning: no previous prototype for 'lan78xx_defer_kevent' [-Wmissing-prototypes]
      drivers/net/usb/lan78xx.c:1409:5: warning: no previous prototype for 'lan78xx_nway_reset' [-Wmissing-prototypes]
      drivers/net/usb/lan78xx.c:2000:5: warning: no previous prototype for 'lan78xx_set_mac_addr' [-Wmissing-prototypes]
      ....
      
      In fact, these functions are only used in the file in which they are
      declared and don't need a declaration, but can be made static.
      so this patch marks these functions with 'static'.
      Signed-off-by: NBaoyou Xie <baoyou.xie@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e0c79ff6
  23. 14 8月, 2016 1 次提交
  24. 05 5月, 2016 1 次提交
  25. 29 4月, 2016 2 次提交
  26. 21 3月, 2016 1 次提交
    • D
      Revert "lan78xx: add ndo_get_stats64" · 1c191307
      David S. Miller 提交于
      This reverts commit a59f8c5b.
      
      There are several bugs in this new code, for example:
      
      1) Uses sleeping locks in get_stats64, which is not allowed,
         as the operation can be invoked in an atomic context.
      
      2) Uses PM fields without CONFIG_PM or similar guards.
      
      3) Does not synchronize HW stats when the device runtime
         suspends.
      
      Therefore this is being reverted until a correct version
      is implemented.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1c191307
  27. 19 3月, 2016 2 次提交
  28. 01 3月, 2016 3 次提交
  29. 29 1月, 2016 3 次提交
  30. 08 1月, 2016 2 次提交