1. 18 Oct, 2017 40 commits
    • Jakub Kicinski's avatar
      bpf: split verifier and program ops · 7de16e3a
      Jakub Kicinski authored
      struct bpf_verifier_ops contains both verifier ops and operations
      used later during program's lifetime (test_run).  Split the runtime
      ops into a different structure.
      
      BPF_PROG_TYPE() will now append ## _prog_ops or ## _verifier_ops
      to the names.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7de16e3a
    • David Ahern's avatar
      tcp: Check daddr_cache before use in tracepoint · 386fd5da
      David Ahern authored
      Running perf in one window to capture tcp_retransmit_skb tracepoint:
          $ perf record -e tcp:tcp_retransmit_skb -a
      
      And causing a retransmission on an active TCP session (e.g., dropping
      packets in the receiver, changing MTU on the interface to 500 and back
      to 1500) triggers a panic:
      
      [   58.543144] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
      [   58.545300] IP: perf_trace_tcp_retransmit_skb+0xd0/0x145
      [   58.546770] PGD 0 P4D 0
      [   58.547472] Oops: 0000 [#1] SMP
      [   58.548328] Modules linked in: vrf
      [   58.549262] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.14.0-rc4+ #26
      [   58.551004] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
      [   58.554560] task: ffffffff81a0e540 task.stack: ffffffff81a00000
      [   58.555817] RIP: 0010:perf_trace_tcp_retransmit_skb+0xd0/0x145
      [   58.557137] RSP: 0018:ffff88003fc03d68 EFLAGS: 00010282
      [   58.558292] RAX: 0000000000000000 RBX: ffffe8ffffc0ec80 RCX: ffff880038543098
      [   58.559850] RDX: 0400000000000000 RSI: ffff88003fc03d70 RDI: ffff88003fc14b68
      [   58.561099] RBP: ffff88003fc03da8 R08: 0000000000000000 R09: ffffea0000d3224a
      [   58.562005] R10: ffff88003fc03db8 R11: 0000000000000010 R12: ffff8800385428c0
      [   58.562930] R13: ffffe8ffffc0e478 R14: ffffffff81a93a40 R15: ffff88003d4f0c00
      [   58.563845] FS:  0000000000000000(0000) GS:ffff88003fc00000(0000) knlGS:0000000000000000
      [   58.564873] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   58.565613] CR2: 0000000000000008 CR3: 000000003d68f004 CR4: 00000000000606f0
      [   58.566538] Call Trace:
      [   58.566865]  <IRQ>
      [   58.567140]  __tcp_retransmit_skb+0x4ab/0x4c6
      [   58.567704]  ? tcp_set_ca_state+0x22/0x3f
      [   58.568231]  tcp_retransmit_skb+0x14/0xa3
      [   58.568754]  tcp_retransmit_timer+0x472/0x5e3
      [   58.569324]  ? tcp_write_timer_handler+0x1e9/0x1e9
      [   58.569946]  tcp_write_timer_handler+0x95/0x1e9
      [   58.570548]  tcp_write_timer+0x2a/0x58
      
      Check that daddr_cache is non-NULL before de-referencing.
      
      Fixes: e086101b ("tcp: add a tracepoint for tcp retransmission")
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Acked-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      386fd5da
    • Gustavo A. R. Silva's avatar
      net: ipx: mark expected switch fall-through · d4f4da3e
      Gustavo A. R. Silva authored
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d4f4da3e
    • Gustavo A. R. Silva's avatar
      ipv6: mark expected switch fall-throughs · 275757e6
      Gustavo A. R. Silva authored
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      
      Notice that in some cases I placed the "fall through" comment
      on its own line, which is what GCC is expecting to find.
      Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      275757e6
    • David Ahern's avatar
      tcp: Use pI6c in tcp tracepoint · fb6ff75e
      David Ahern authored
      The compact form for IPv6 addresses is more user friendly than the full
      version. For example:
         compact: 2001:db8:1::1
            full: 2001:0db8:0001:0000:0000:0000:0000:0004i
      
      Update the tcp tracepoint to show the compact form.
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Acked-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fb6ff75e
    • Gustavo A. R. Silva's avatar
      ipv4: mark expected switch fall-throughs · fcfd6dfa
      Gustavo A. R. Silva authored
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      
      Notice that in some cases I placed the "fall through" comment
      on its own line, which is what GCC is expecting to find.
      
      Addresses-Coverity-ID: 115108
      Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fcfd6dfa
    • Gustavo A. R. Silva's avatar
      decnet: af_decnet: mark expected switch fall-throughs · 86e58cce
      Gustavo A. R. Silva authored
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      86e58cce
    • David S. Miller's avatar
      Merge branch 'DSA-DPAA' · 54e6d7be
      David S. Miller authored
      Madalin Bucur says:
      
      ====================
      adapt DPAA drivers for DSA
      
      Junote Cai reported that he was not able to get a DSA setup involving the
      DPAA/FMAN driver to work and narrowed it down to of_find_net_device_by_node()
      call in DSA setup. The initial attempt to fix this by adding of_node to the
      platform device results in a second, failed, probing of the FMan MAC driver
      against the new platform device created for the DPAA Ethernet driver.
      Solve these issues by removing the of_node pointer from the platform device
      and changing the net_dev dev to the of_device dev to ensure the DSA init
      will be able to find the DPAA net_dev using of_find_net_device_by_node().
      Several changes were required to enable this solution: refactoring the
      adjust_link (also resulted in lesser, cleaner code) and renaming the fman
      kernel modules to keep the legacy udev rules happy.
      
      Changes in v2:
      
       - fix issue on error path in "dpaa_eth: change device used" patch
       - cleanup the dpaa_eth_probe() error paths
      
      Changes in v3:
      
       - remove obsolete comment in moved code
       - add explanation for module rename
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      54e6d7be
    • Madalin Bucur's avatar
      dpaa_eth: remove obsolete comment · f1851a69
      Madalin Bucur authored
      Comment is no longer valid for a long time now.
      Signed-off-by: default avatarMadalin Bucur <madalin.bucur@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f1851a69
    • Madalin Bucur's avatar
      fsl/fman: add dpaa in module names · c69fde72
      Madalin Bucur authored
      This change just renames the FMan driver modules, using a common prefix
      for the DPAA FMan and DPAA Ethernet drivers. Besides making the names more
      aligned, this allows writing udev rules that match on either driver name,
      if needed, using the fsl_dpaa_* prefix. The change of netdev dev required
      for the DSA probing makes the previous rules written using this prefix
      fail, this change makes them work again, ensuring backwards compatibility
      for their users.
      Signed-off-by: default avatarMadalin Bucur <madalin.bucur@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c69fde72
    • Madalin Bucur's avatar
    • Madalin Bucur's avatar
      dpaa_eth: change device used · c6e26ea8
      Madalin Bucur authored
      Change device used for DMA mapping to the MAC device that is an
      of_device, with proper DMA ops. Using this device for the netdevice
      should also address the issue with DSA scenarios that need the
      netdevice to be backed by an of_device.
      Signed-off-by: default avatarMadalin Bucur <madalin.bucur@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c6e26ea8
    • Madalin Bucur's avatar
    • Madalin Bucur's avatar
      fsl/fman: remove of_node · 48167c9c
      Madalin Bucur authored
      The FMan MAC driver allocates a platform device for the Ethernet
      driver to probe on. Setting pdev->dev.of_node with the MAC node
      triggers the MAC driver probing of the new platform device. While
      this fails quickly and does not affect the functionality of the
      drivers, it is incorrect and must be removed. This was added to
      address a report that DSA code using of_find_net_device_by_node()
      is unable to use the DPAA interfaces. Error message seen before
      this fix:
      
      fsl_mac dpaa-ethernet.0: __devm_request_mem_region(mac) failed
      fsl_mac: probe of dpaa-ethernet.0 failed with error -16
      Signed-off-by: default avatarMadalin Bucur <madalin.bucur@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      48167c9c
    • Jakub Kicinski's avatar
      tools: bpftool: use more common tag format · 2dc7c1fe
      Jakub Kicinski authored
      Program tag is usually displayed as string of bytes without
      any separators (e.g. as "aa5520b1090cfeb6" vs MAC addr-like
      format bpftool uses currently: "aa:55:20:b1:09:0c:fe:b6").
      Make bptfool use the more common format both for displaying
      the tag and selecting the program by tag.
      
      This was pointed out in review but I misunderstood the comment.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2dc7c1fe
    • David S. Miller's avatar
      Merge branch 'networking-Convert-timers-to-use-timer_setup' · 2af55f46
      David S. Miller authored
      Kees Cook says:
      
      ====================
      networking: Convert timers to use timer_setup()
      
      This is the current set of outstanding networking patches to perform
      conversions to the new timer interface (rebased to -next). This is not
      all expected conversions, but it contains everything needed in networking
      to eliminate init_timer(), and all the non-standard setup_*_timer() uses.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2af55f46
    • Kees Cook's avatar
      sunrpc: Convert timers to use timer_setup() · ff861c4d
      Kees Cook authored
      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: Trond Myklebust <trond.myklebust@primarydata.com>
      Cc: Anna Schumaker <anna.schumaker@netapp.com>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: Jeff Layton <jlayton@poochiereds.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: linux-nfs@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ff861c4d
    • Kees Cook's avatar
      ipv4: timewait: Convert timers to use timer_setup() · 1ab791dc
      Kees Cook authored
      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: "David S. Miller" <davem@davemloft.net>
      Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1ab791dc
    • Kees Cook's avatar
      um: net: Convert timers to use timer_setup() · 02ab4fca
      Kees Cook authored
      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. (Note that this timer is actually
      disabled.)
      
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jarod Wilson <jarod@redhat.com>
      Cc: user-mode-linux-devel@lists.sourceforge.net
      Cc: user-mode-linux-user@lists.sourceforge.net
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      02ab4fca
    • Kees Cook's avatar
      net: fs_enet: Remove unused timer · 7d85b2c8
      Kees Cook authored
      Removes unused timer and its old initialization call.
      
      Cc: Pantelis Antoniou <pantelis.antoniou@gmail.com>
      Cc: Vitaly Bordug <vbordug@ru.mvista.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7d85b2c8
    • Kees Cook's avatar
      net/xen-netback: Convert timers to use timer_setup() · cac6a8f9
      Kees Cook authored
      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: Wei Liu <wei.liu2@citrix.com>
      Cc: Paul Durrant <paul.durrant@citrix.com>
      Cc: xen-devel@lists.xenproject.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cac6a8f9
    • Kees Cook's avatar
      net: atm: Convert timers to use timer_setup() · ba421793
      Kees Cook authored
      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. Also drops a redundant initialization
      that is already set up by DEFINE_TIMER.
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Hans Liljestrand <ishkamiel@gmail.com>
      Cc: "Reshetova, Elena" <elena.reshetova@intel.com>
      Cc: Bhumika Goyal <bhumirks@gmail.com>
      Cc: Johannes Berg <johannes.berg@intel.com>
      Cc: Roopa Prabhu <roopa@cumulusnetworks.com>
      Cc: Augusto Mecking Caringi <augustocaringi@gmail.com>
      Cc: Jarod Wilson <jarod@redhat.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ba421793
    • Kees Cook's avatar
      net/core: Convert sk_timer users to use timer_setup() · 99767f27
      Kees Cook authored
      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 for all users of sk_timer.
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Andrew Hendry <andrew.hendry@gmail.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Paolo Abeni <pabeni@redhat.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Julia Lawall <julia.lawall@lip6.fr>
      Cc: linzhang <xiaolou4617@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: netdev@vger.kernel.org
      Cc: linux-hams@vger.kernel.org
      Cc: linux-x25@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      99767f27
    • Kees Cook's avatar
      ethernet/intel: Convert timers to use timer_setup() · 26566eae
      Kees Cook authored
      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. Switches test of .data field to
      .function, since .data will be going away.
      
      Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      Cc: intel-wired-lan@lists.osuosl.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      26566eae
    • Kees Cook's avatar
      net: hns: Convert timers to use timer_setup() · d039ef68
      Kees Cook authored
      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. Switches test of .data field to
      .function, since .data will be going away.
      
      Cc: Yisen Zhuang <yisen.zhuang@huawei.com>
      Cc: Salil Mehta <salil.mehta@huawei.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: lipeng <lipeng321@huawei.com>
      Cc: Lin Yun Sheng <linyunsheng@huawei.com>
      Cc: Kejian Yan <yankejian@huawei.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d039ef68
    • Kees Cook's avatar
      net: neterion: Convert timers to use timer_setup() · e84a2ac9
      Kees Cook authored
      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: Jon Mason <jdmason@kudzu.us>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e84a2ac9
    • Kees Cook's avatar
      net: usb: Convert timers to use timer_setup() · d28bb967
      Kees Cook authored
      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: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d28bb967
    • Kees Cook's avatar
      net/ethernet/sgi: Convert timers to use timer_setup() · dfc57004
      Kees Cook authored
      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: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dfc57004
    • Kees Cook's avatar
      hamradio/scc: Convert timers to use timer_setup() · 41e9475c
      Kees Cook authored
      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: Joerg Reuter <jreuter@yaina.de>
      Cc: linux-hams@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      41e9475c
    • Kees Cook's avatar
      net: seeq: Convert timers to use timer_setup() · 6fd9c53f
      Kees Cook authored
      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: Russell King <linux@armlinux.org.uk>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6fd9c53f
    • Kees Cook's avatar
      net: ethernet: sun: Convert timers to use timer_setup() · 0822c5d9
      Kees Cook authored
      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: "David S. Miller" <davem@davemloft.net>
      Cc: Philippe Reynes <tremyfr@gmail.com>
      Cc: Jarod Wilson <jarod@redhat.com>
      Cc: Shannon Nelson <shannon.nelson@oracle.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: chris hyser <chris.hyser@oracle.com>
      Cc: Tushar Dave <tushar.n.dave@oracle.com>
      Cc: Tobias Klauser <tklauser@distanz.ch>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Acked-by: default avatarShannon Nelson <shannon.nelson@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0822c5d9
    • Kees Cook's avatar
      net: ethernet: apple: Convert timers to use timer_setup() · de892f8f
      Kees Cook authored
      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: "David S. Miller" <davem@davemloft.net>
      Cc: Johannes Berg <johannes.berg@intel.com>
      Cc: Jarod Wilson <jarod@redhat.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de892f8f
    • Kees Cook's avatar
      isdnloop: Convert timers to use timer_setup() · 11286125
      Kees Cook authored
      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. Added missing initialization for
      rb_timer.
      
      Cc: Karsten Keil <isdn@linux-pingi.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Johannes Berg <johannes.berg@intel.com>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      11286125
    • Kees Cook's avatar
      drivers/net/appletalk: Convert timers to use timer_setup() · 5f2585d4
      Kees Cook authored
      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. Adds a static variable to hold the
      polled net_device.
      
      Cc: David Howells <dhowells@redhat.com>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5f2585d4
    • Kees Cook's avatar
      appletalk: Remove unneeded synchronization · 9ba650a4
      Kees Cook authored
      The use of del_timer_sync() will make sure a timer is not rescheduled.
      As such, there is no need to add external signals to kill timers. In
      preparation for switching the timer callback argument to the timer
      pointer, this drops the .data argument since it doesn't serve a meaningful
      purpose here.
      
      Cc: David Howells <dhowells@redhat.com>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9ba650a4
    • Kees Cook's avatar
      hdlc: Convert timers to use timer_setup() · d26c089e
      Kees Cook authored
      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. This adds a pointer back to the
      net_device, and drops needless open-coded resetting of the .function and
      .data fields.
      
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Krzysztof Halasa <khc@pm.waw.pl>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d26c089e
    • Kees Cook's avatar
      net/core: Collapse redundant sk_timer callback data assignments · 9f12a77e
      Kees Cook authored
      The core sk_timer initializer can provide the common .data assignment
      instead of it being set separately in users.
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Andrew Hendry <andrew.hendry@gmail.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Paolo Abeni <pabeni@redhat.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Colin Ian King <colin.king@canonical.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: linzhang <xiaolou4617@gmail.com>
      Cc: netdev@vger.kernel.org
      Cc: linux-hams@vger.kernel.org
      Cc: linux-x25@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9f12a77e
    • Kees Cook's avatar
      inet: frags: Convert timers to use timer_setup() · 78802011
      Kees Cook authored
      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: Alexander Aring <alex.aring@gmail.com>
      Cc: Stefan Schmidt <stefan@osg.samsung.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Cc: Pablo Neira Ayuso <pablo@netfilter.org>
      Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
      Cc: Florian Westphal <fw@strlen.de>
      Cc: linux-wpan@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Cc: netfilter-devel@vger.kernel.org
      Cc: coreteam@netfilter.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Acked-by: Stefan Schmidt <stefan@osg.samsung.com> # for ieee802154
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      78802011
    • Kees Cook's avatar
      inet/connection_sock: Convert timers to use timer_setup() · 59f379f9
      Kees Cook authored
      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: "David S. Miller" <davem@davemloft.net>
      Cc: Gerrit Renker <gerrit@erg.abdn.ac.uk>
      Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Cc: netdev@vger.kernel.org
      Cc: dccp@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      59f379f9
    • Kees Cook's avatar
      netfilter: ipset: Convert timers to use timer_setup() · a92c5751
      Kees Cook authored
      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. This introduces a pointer back to the
      struct ip_set, which is used instead of the struct timer_list .data field.
      
      Cc: Pablo Neira Ayuso <pablo@netfilter.org>
      Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
      Cc: Florian Westphal <fw@strlen.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Cc: simran singhal <singhalsimran0@gmail.com>
      Cc: Muhammad Falak R Wani <falakreyaz@gmail.com>
      Cc: netfilter-devel@vger.kernel.org
      Cc: coreteam@netfilter.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a92c5751