Skip to content
  1. Mar 04, 2017
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf · 20b83643
      David S. Miller authored
      
      
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      The following patchset contains Netfilter fixes for your net tree,
      they are:
      
      1) Missing check for full sock in ip_route_me_harder(), from
         Florian Westphal.
      
      2) Incorrect sip helper structure initilization that breaks it when
         several ports are used, from Christophe Leroy.
      
      3) Fix incorrect assumption when looking up for matching with adjacent
         intervals in the nft_set_rbtree.
      
      4) Fix broken netlink event error reporting in nf_tables that results
         in misleading ESRCH errors propagated to userspace listeners.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      20b83643
    • David S. Miller's avatar
      Merge branch 'sfx-fixes' · 45115553
      David S. Miller authored
      
      
      Edward Cree says:
      
      ====================
      sfc: couple of fixes
      
      First patch addresses a construct that causes sparse to error out.
      With that fixed, sparse makes some warnings on ef10.c, second patch
       fixes one of them.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      45115553
    • Edward Cree's avatar
      sfc: fix IPID endianness in TSOv2 · 6d43131c
      Edward Cree authored
      The value we read from the header is in network byte order, whereas
       EFX_POPULATE_QWORD_* takes values in host byte order (which it then
       converts to little-endian, as MCDI is little-endian).
      
      Fixes: e9117e50
      
       ("sfc: Firmware-Assisted TSO version 2")
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6d43131c
    • Edward Cree's avatar
      sfc: avoid max() in array size · d0346b03
      Edward Cree authored
      
      
      It confuses sparse, which thinks the size isn't constant.  Let's achieve
       the same thing with a BUILD_BUG_ON, since we know which one should be
       bigger and don't expect them ever to change.
      
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d0346b03
    • David S. Miller's avatar
      Merge tag 'linux-can-fixes-for-4.11-20170303' of... · 48051c37
      David S. Miller authored
      Merge tag 'linux-can-fixes-for-4.11-20170303' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
      
      
      
      Marc Kleine-Budde says:
      
      ====================
      pull-request: can 2017-03-03
      
      this is a pull request for the upcoming v4.11 release.
      
      There are two patches by Ethan Zonca for the gs_usb driver, the first one fixes
      the memory used for USB transfers, the second one the coding style.
      
      The last two patches are by me, one fixing a memory leak in the usb_8dev driver
      the other a typo in the flexcan driver.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      48051c37
    • Zhu Yanjun's avatar
      rds: remove unnecessary returned value check · a8d63a53
      Zhu Yanjun authored
      
      
      The function rds_trans_register always returns 0. As such, it is not
      necessary to check the returned value.
      
      Cc: Joe Jin <joe.jin@oracle.com>
      Cc: Junxiao Bi <junxiao.bi@oracle.com>
      Signed-off-by: default avatarZhu Yanjun <yanjun.zhu@oracle.com>
      Reviewed-by: default avatarYuval Shaia <yuval.shaia@oracle.com>
      Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a8d63a53
    • David Howells's avatar
      rxrpc: Fix potential NULL-pointer exception · 37411cad
      David Howells authored
      Fix a potential NULL-pointer exception in rxrpc_do_sendmsg().  The call
      state check that I added should have gone into the else-body of the
      if-statement where we actually have a call to check.
      
      Found by CoverityScan CID#1414316 ("Dereference after null check").
      
      Fixes: 540b1c48
      
       ("rxrpc: Fix deadlock between call creation and sendmsg/recvmsg")
      Reported-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      37411cad
    • David S. Miller's avatar
      Merge branch 'nfp-fixes' · b3b6157a
      David S. Miller authored
      
      
      Jakub Kicinski says:
      
      ====================
      nfp: RX and XDP buffer fixes
      
      Two trivial fixes for code introduced with XDP support.  First
      one corrects the buffer size we populate a register with.  The
      register is designed to be used for scatter transfers which
      the driver (and most FWs) don't support so it's not critical.
      The other one for DMA direction is mostly cosmetic, DMA API
      doesn't seem to care today about the precise direction in sync
      calls.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b3b6157a
    • Jakub Kicinski's avatar
      nfp: correct DMA direction in XDP DMA sync · d58cebb7
      Jakub Kicinski authored
      dma_sync_single_for_*() takes the direction in which the buffer
      was mapped, not the direction of the sync.  We should sync XDP
      buffers bidirectionally.
      
      Fixes: ecd63a02
      
       ("nfp: add XDP support in the driver")
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d58cebb7
    • Jakub Kicinski's avatar
      nfp: don't tell FW about the reserved buffer space · 9383b337
      Jakub Kicinski authored
      Since commit c0f031bc ("nfp_net: use alloc_frag() and build_skb()")
      we are allocating buffers which have to hold both the data and skb to
      be created in place by build_skb().
      
      FW should only be told about the buffer space it can DMA to, that
      is without the build_skb() headroom and tailroom.  Note: firmware
      applications should validate the buffers against both MTU and
      free list buffer size so oversized packets would not pass through
      the NIC anyway.
      
      Fixes: c0f031bc
      
       ("nfp: use alloc_frag() and build_skb()")
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9383b337
    • David S. Miller's avatar
      Merge branch 'bgmac-fixes' · e2859980
      David S. Miller authored
      
      
      Jon Mason says:
      
      ====================
      net: ethernet: bgmac: bug fixes
      
      Changes in v5:
      * Rebased to the latest code and fixed up a compile error due to the
        mac_addr struct going away (found by David Miller)
      
      Changes in v4:
      * Added the udelays from the previous code (per David Miller)
      
      Changes in v3:
      * Reworked the init sequence patch to only remove the device reset if
        the device is actually in reset.  Given that this code doesn't bear
        much resemblance to the original code, I'm changing the author of the
        patch.  This was tested on NS2 SVK.
      
      Changes in v2:
      * Reworked the first match to make it more obvious what portions of the
        register were being preserved (Per Rafal Mileki)
      * Style change to reorder the function variables in patch 2 (per Sergei
        Shtylyov)
      
      Bug fixes for bgmac driver
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e2859980
    • Hari Vyas's avatar
      net: ethernet: bgmac: mac address change bug · fa42245d
      Hari Vyas authored
      
      
      ndo_set_mac_address() passes struct sockaddr * as 2nd parameter to
      bgmac_set_mac_address() but code assumed u8 *.  This caused two bytes
      chopping and the wrong mac address was configured.
      
      Signed-off-by: default avatarHari Vyas <hariv@broadcom.com>
      Signed-off-by: default avatarJon Mason <jon.mason@broadcom.com>
      Fixes: 4e209001
      
       ("bgmac: write mac address to hardware in ndo_set_mac_address")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fa42245d
    • Jon Mason's avatar
      net: ethernet: bgmac: init sequence bug · 16206524
      Jon Mason authored
      
      
      Fix a bug in the 'bgmac' driver init sequence that blind writes for init
      sequence where it should preserve most bits other than the ones it is
      deliberately manipulating.
      
      The code now checks to see if the adapter needs to be brought out of
      reset (where as before it was doing an IDM write to bring it out of
      reset regardless of whether it was in reset or not).  Also, removed
      unnecessary usleeps (as there is already a read present to flush the
      IDM writes).
      
      Signed-off-by: default avatarZac Schroff <zschroff@broadcom.com>
      Signed-off-by: default avatarJon Mason <jon.mason@broadcom.com>
      Fixes: f6a95a24
      
       ("net: ethernet: bgmac: Add platform device support")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      16206524
    • David S. Miller's avatar
      Merge branch 'xen-netback-fixes' · 2ddbcea7
      David S. Miller authored
      Paul Durrant says:
      
      ====================
      xen-netback: update memory leak fix to avoid BUG
      
      Commit 9a6cdf52 "xen-netback: fix memory leaks on XenBus disconnect"
      added missing code to fix a memory leak by calling vfree() in the
      appropriate place.
      Unfortunately subsequent commit f16f1df6
      
       "xen-netback: protect
      resource cleaning on XenBus disconnect" then wrapped this call to vfree()
      in a spin lock, leading to a BUG due to incorrect context.
      
      Patch #1 makes the existing code more readable
      Patch #2 fixes the problem
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2ddbcea7
    • Paul Durrant's avatar
      xen-netback: don't vfree() queues under spinlock · a254d8f9
      Paul Durrant authored
      
      
      This leads to a BUG of the following form:
      
      [  174.512861] switch: port 2(vif3.0) entered disabled state
      [  174.522735] BUG: sleeping function called from invalid context at
      /home/build/linux-linus/mm/vmalloc.c:1441
      [  174.523451] in_atomic(): 1, irqs_disabled(): 0, pid: 28, name: xenwatch
      [  174.524131] CPU: 1 PID: 28 Comm: xenwatch Tainted: G        W
      4.10.0upstream-11073-g4977ab6-dirty #1
      [  174.524819] Hardware name: MSI MS-7680/H61M-P23 (MS-7680), BIOS V17.0
      03/14/2011
      [  174.525517] Call Trace:
      [  174.526217]  show_stack+0x23/0x60
      [  174.526899]  dump_stack+0x5b/0x88
      [  174.527562]  ___might_sleep+0xde/0x130
      [  174.528208]  __might_sleep+0x35/0xa0
      [  174.528840]  ? _raw_spin_unlock_irqrestore+0x13/0x20
      [  174.529463]  ? __wake_up+0x40/0x50
      [  174.530089]  remove_vm_area+0x20/0x90
      [  174.530724]  __vunmap+0x1d/0xc0
      [  174.531346]  ? delete_object_full+0x13/0x20
      [  174.531973]  vfree+0x40/0x80
      [  174.532594]  set_backend_state+0x18a/0xa90
      [  174.533221]  ? dwc_scan_descriptors+0x24d/0x430
      [  174.533850]  ? kfree+0x5b/0xc0
      [  174.534476]  ? xenbus_read+0x3d/0x50
      [  174.535101]  ? xenbus_read+0x3d/0x50
      [  174.535718]  ? xenbus_gather+0x31/0x90
      [  174.536332]  ? ___might_sleep+0xf6/0x130
      [  174.536945]  frontend_changed+0x6b/0xd0
      [  174.537565]  xenbus_otherend_changed+0x7d/0x80
      [  174.538185]  frontend_changed+0x12/0x20
      [  174.538803]  xenwatch_thread+0x74/0x110
      [  174.539417]  ? woken_wake_function+0x20/0x20
      [  174.540049]  kthread+0xe5/0x120
      [  174.540663]  ? xenbus_printf+0x50/0x50
      [  174.541278]  ? __kthread_init_worker+0x40/0x40
      [  174.541898]  ret_from_fork+0x21/0x2c
      [  174.548635] switch: port 2(vif3.0) entered disabled state
      
      This patch defers the vfree() until after the spinlock is released.
      
      Reported-by: default avatarJuergen Gross <jgross@suse.com>
      Signed-off-by: default avatarPaul Durrant <paul.durrant@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a254d8f9
    • Paul Durrant's avatar
      xen-netback: keep a local pointer for vif in backend_disconnect() · d67ce7da
      Paul Durrant authored
      
      
      This patch replaces use of 'be->vif' with 'vif' and hence generally
      makes the function look tidier. No semantic change.
      
      Signed-off-by: default avatarPaul Durrant <paul.durrant@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d67ce7da
    • David S. Miller's avatar
      Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue · f7bb3d86
      David S. Miller authored
      
      
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2017-03-02
      
      This series contains fixes to ixgbe only.
      
      Paolo fixes the driver so that you can actually update the RSS key value
      via ethtool.
      
      Alex fixes an issue on architectures that have a cache line size larger
      than 64 Bytes, where the amount of headroom for the frame starts
      shrinking.  To take this into account, Alex adds one small check so that
      we compare the max_frame to the amount of actual data we can store, so
      we will automatically enable 3K receive buffers as soon as the maximum
      frame size we can handle drops below the standard Ethernet MTU.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f7bb3d86
  2. Mar 03, 2017