1. 15 2月, 2017 1 次提交
  2. 19 1月, 2017 1 次提交
    • T
      net: Remove usage of net_device last_rx member · 4a7c9726
      Tobias Klauser 提交于
      The network stack no longer uses the last_rx member of struct net_device
      since the bonding driver switched to use its own private last_rx in
      commit 9f242738 ("bonding: use last_arp_rx in slave_last_rx()").
      
      However, some drivers still (ab)use the field for their own purposes and
      some driver just update it without actually using it.
      
      Previously, there was an accompanying comment for the last_rx member
      added in commit 4dc89133 ("net: add a comment on netdev->last_rx")
      which asked drivers not to update is, unless really needed. However,
      this commend was removed in commit f8ff080d ("bonding: remove
      useless updating of slave->dev->last_rx"), so some drivers added later
      on still did update last_rx.
      
      Remove all usage of last_rx and switch three drivers (sky2, atp and
      smc91c92_cs) which actually read and write it to use their own private
      copy in netdev_priv.
      
      Compile-tested with allyesconfig and allmodconfig on x86 and arm.
      
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Jay Vosburgh <j.vosburgh@gmail.com>
      Cc: Veaceslav Falico <vfalico@gmail.com>
      Cc: Andy Gospodarek <andy@greyhouse.net>
      Cc: Mirko Lindner <mlindner@marvell.com>
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NTobias Klauser <tklauser@distanz.ch>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Reviewed-by: NJay Vosburgh <jay.vosburgh@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4a7c9726
  3. 25 12月, 2016 1 次提交
  4. 18 12月, 2016 1 次提交
  5. 07 12月, 2016 7 次提交
  6. 06 12月, 2016 1 次提交
  7. 04 12月, 2016 1 次提交
    • A
      irda: w83977af_ir: fix damaged whitespace · 7b2024fd
      Arnd Bergmann 提交于
      As David Miller pointed out for for the previous patch, the whitespace
      in some functions looks rather odd. This was caused by commit 6329da5f
      ("obsolete config in kernel source: USE_INTERNAL_TIMER"), which removed
      some conditions but did not reindent the code.
      
      This fixes the indentation in the file and removes extraneous whitespace
      at the end of the lines and before tabs.
      
      There are many other minor coding style problems in the driver, but I'm
      not touching those here.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7b2024fd
  8. 28 11月, 2016 1 次提交
    • A
      irda: fix overly long udelay() · c9bd2823
      Arnd Bergmann 提交于
      irda_get_mtt() returns a hardcoded '10000' in some cases,
      and with gcc-7, we get a build error because this triggers a
      compile-time check in udelay():
      
      drivers/net/irda/w83977af_ir.o: In function `w83977af_hard_xmit':
      w83977af_ir.c:(.text.w83977af_hard_xmit+0x14c): undefined reference to `__bad_udelay'
      
      Older compilers did not run into this because they either did not
      completely inline the irda_get_mtt() or did not consider the
      10000 value a constant expression.
      
      The code has been wrong since the start of git history.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c9bd2823
  9. 20 5月, 2016 1 次提交
  10. 05 5月, 2016 1 次提交
  11. 05 4月, 2016 1 次提交
  12. 07 2月, 2016 1 次提交
    • P
      net: irda: Fix use-after-free in irtty_open() · 401879c5
      Peter Hurley 提交于
      The N_IRDA line discipline may access the previous line discipline's closed
      and already-fre private data on open [1].
      
      The tty->disc_data field _never_ refers to valid data on entry to the
      line discipline's open() method. Rather, the ldisc is expected to
      initialize that field for its own use for the lifetime of the instance
      (ie. from open() to close() only).
      
      [1]
          ==================================================================
          BUG: KASAN: use-after-free in irtty_open+0x422/0x550 at addr ffff8800331dd068
          Read of size 4 by task a.out/13960
          =============================================================================
          BUG kmalloc-512 (Tainted: G    B          ): kasan: bad access detected
          -----------------------------------------------------------------------------
          ...
          Call Trace:
           [<ffffffff815fa2ae>] __asan_report_load4_noabort+0x3e/0x40 mm/kasan/report.c:279
           [<ffffffff836938a2>] irtty_open+0x422/0x550 drivers/net/irda/irtty-sir.c:436
           [<ffffffff829f1b80>] tty_ldisc_open.isra.2+0x60/0xa0 drivers/tty/tty_ldisc.c:447
           [<ffffffff829f21c0>] tty_set_ldisc+0x1a0/0x940 drivers/tty/tty_ldisc.c:567
           [<     inline     >] tiocsetd drivers/tty/tty_io.c:2650
           [<ffffffff829da49e>] tty_ioctl+0xace/0x1fd0 drivers/tty/tty_io.c:2883
           [<     inline     >] vfs_ioctl fs/ioctl.c:43
           [<ffffffff816708ac>] do_vfs_ioctl+0x57c/0xe60 fs/ioctl.c:607
           [<     inline     >] SYSC_ioctl fs/ioctl.c:622
           [<ffffffff81671204>] SyS_ioctl+0x74/0x80 fs/ioctl.c:613
           [<ffffffff852a7876>] entry_SYSCALL_64_fastpath+0x16/0x7a
      Reported-and-tested-by: NDmitry Vyukov <dvyukov@google.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      401879c5
  13. 22 1月, 2016 1 次提交
    • S
      net/irda: bfin_sir: remove duplicate defines · ceb6560a
      Sudip Mukherjee 提交于
      The defconfig build of blackfin is failing with the error:
      
      arch/blackfin/include/asm/bfin_serial.h:269:0: warning: "port_membase" redefined
      drivers/net/irda/bfin_sir.h:85:0: note: this is the location of the previous definition
      arch/blackfin/include/asm/bfin_serial.h:382:0: warning: "get_lsr_cache" redefined
      drivers/net/irda/bfin_sir.h:86:0: note: this is the location of the previous definition
      arch/blackfin/include/asm/bfin_serial.h:383:0: warning: "put_lsr_cache" redefined
      drivers/net/irda/bfin_sir.h:87:0: note: this is the location of the previous definition
      
      port_membase, get_lsr_cache, put_lsr_cache are already defined in the
      architecture files, no need to define them again in the driver.
      Signed-off-by: NSudip Mukherjee <sudip@vectorindia.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ceb6560a
  14. 09 1月, 2016 1 次提交
  15. 29 9月, 2015 3 次提交
  16. 12 9月, 2015 1 次提交
    • A
      irda: ali-ircc: Fix deadlock in ali_ircc_sir_change_speed() · e8684c88
      Alexey Khoroshilov 提交于
      ali_ircc_sir_change_speed() is always called with self->lock held,
      so acquiring the lock inside it leads to unavoidable deadlock.
      
      Call graph:
      ali_ircc_sir_change_speed() is called from ali_ircc_change_speed()
        ali_ircc_fir_hard_xmit() under spin_lock_irqsave(&self->lock, flags);
        ali_ircc_sir_hard_xmit() under spin_lock_irqsave(&self->lock, flags);
        ali_ircc_net_ioctl() under spin_lock_irqsave(&self->lock, flags);
        ali_ircc_dma_xmit_complete()
          ali_ircc_fir_interrupt()
            ali_ircc_interrupt() under spin_lock(&self->lock);
        ali_ircc_sir_write_wakeup()
          ali_ircc_sir_interrupt()
            ali_ircc_interrupt() under spin_lock(&self->lock);
      
      The patch removes spin_lock/unlock from ali_ircc_sir_change_speed().
      
      Found by Linux Driver Verification project (linuxtesting.org).
      Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e8684c88
  17. 26 5月, 2015 1 次提交
    • N
      irda: irda-usb: use msecs_to_jiffies for conversions · bbfe0f37
      Nicholas Mc Guire 提交于
      API compliance scanning with coccinelle flagged:
      
      Converting milliseconds to jiffies by "val * HZ / 1000" is technically
      is not a clean solution as it does not handle all corner cases correctly.
      By changing the conversion to use msecs_to_jiffies(val) conversion is
      correct in all cases.
      
      in the current code:
        mod_timer(&self->rx_defer_timer, jiffies + (10 * HZ / 1000));
      for HZ < 100 (e.g. CONFIG_HZ == 64|32 in alpha) this effectively results
      in no delay at all.
      
      Patch was compile tested for x86_64_defconfig (implies CONFIG_USB_IRDA=m)
      
      Patch is against 4.1-rc4 (localversion-next is -next-20150522)
      Signed-off-by: NNicholas Mc Guire <hofrat@osadl.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bbfe0f37
  18. 12 1月, 2015 6 次提交
  19. 31 12月, 2014 1 次提交
  20. 13 11月, 2014 1 次提交
  21. 12 11月, 2014 1 次提交
  22. 20 10月, 2014 1 次提交
  23. 04 10月, 2014 1 次提交
    • C
      drivers/net/irda/Kconfig: Let SH_IRDA depend on HAS_IOMEM · ad2a2a6d
      Chen Gang 提交于
      SH_IRDA needs HAS_IOMEM, so depend on it. The related error(with
      allmodconfig under um):
      
          CC [M]  drivers/net/irda/sh_irda.o
        drivers/net/irda/sh_irda.c: In function ‘sh_irda_probe’:
        drivers/net/irda/sh_irda.c:776:2: error: implicit declaration of function ‘ioremap_nocache’ [-Werror=implicit-function-declaration]
          self->membase = ioremap_nocache(res->start, resource_size(res));
          ^
        drivers/net/irda/sh_irda.c:776:16: warning: assignment makes pointer from integer without a cast [enabled by default]
          self->membase = ioremap_nocache(res->start, resource_size(res));
                        ^
        drivers/net/irda/sh_irda.c:821:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
          iounmap(self->membase);
          ^
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ad2a2a6d
  24. 10 9月, 2014 1 次提交
  25. 14 8月, 2014 1 次提交
  26. 13 8月, 2014 1 次提交
  27. 09 8月, 2014 1 次提交