1. 28 Jan, 2019 1 commit
  2. 16 Jan, 2019 1 commit
    • Juergen Gross's avatar
      xen: Fix x86 sched_clock() interface for xen · 867cefb4
      Juergen Gross authored
      Commit f94c8d11 ("sched/clock, x86/tsc: Rework the x86 'unstable'
      sched_clock() interface") broke Xen guest time handling across
      migration:
      
      [  187.249951] Freezing user space processes ... (elapsed 0.001 seconds) done.
      [  187.251137] OOM killer disabled.
      [  187.251137] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
      [  187.252299] suspending xenstore...
      [  187.266987] xen:grant_table: Grant tables using version 1 layout
      [18446743811.706476] OOM killer enabled.
      [18446743811.706478] Restarting tasks ... done.
      [18446743811.720505] Setting capacity to 16777216
      
      Fix that by setting xen_sched_clock_offset at resume time to ensure a
      monotonic clock value.
      
      [boris: replaced pr_info() with pr_info_once() in xen_callback_vector()
       to avoid printing with incorrect timestamp during resume (as we
       haven't re-adjusted the clock yet)]
      
      Fixes: f94c8d11 ("sched/clock, x86/tsc: Rework the x86 'unstable' sched_clock() interface")
      Cc: <stable@vger.kernel.org> # 4.11
      Reported-by: default avatarHans van Kranenburg <hans.van.kranenburg@mendix.com>
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      Tested-by: default avatarHans van Kranenburg <hans.van.kranenburg@mendix.com>
      Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      867cefb4
  3. 15 Jan, 2019 1 commit
    • Wen Yang's avatar
      pvcalls-front: fix potential null dereference · b4711098
      Wen Yang authored
       static checker warning:
          drivers/xen/pvcalls-front.c:373 alloc_active_ring()
          error: we previously assumed 'map->active.ring' could be null
                 (see line 357)
      
      drivers/xen/pvcalls-front.c
          351 static int alloc_active_ring(struct sock_mapping *map)
          352 {
          353     void *bytes;
          354
          355     map->active.ring = (struct pvcalls_data_intf *)
          356         get_zeroed_page(GFP_KERNEL);
          357     if (!map->active.ring)
                          ^^^^^^^^^^^^^^^^^
      Check
      
          358         goto out;
          359
          360     map->active.ring->ring_order = PVCALLS_RING_ORDER;
          361     bytes = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO,
          362                     PVCALLS_RING_ORDER);
          363     if (!bytes)
          364         goto out;
          365
          366     map->active.data.in = bytes;
          367     map->active.data.out = bytes +
          368         XEN_FLEX_RING_SIZE(PVCALLS_RING_ORDER);
          369
          370     return 0;
          371
          372 out:
      --> 373     free_active_ring(map);
                                       ^^^
      Add null check on map->active.ring before dereferencing it to avoid
      any NULL pointer dereferences.
      
      Fixes: 9f51c05d ("pvcalls-front: Avoid get_free_pages(GFP_KERNEL) under spinlock")
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Suggested-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: default avatarWen Yang <wen.yang99@zte.com.cn>
      Reviewed-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      CC: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      CC: Juergen Gross <jgross@suse.com>
      CC: Stefano Stabellini <sstabellini@kernel.org>
      CC: Dan Carpenter <dan.carpenter@oracle.com>
      CC: xen-devel@lists.xenproject.org
      CC: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      b4711098
  4. 14 Jan, 2019 1 commit
  5. 10 Jan, 2019 1 commit
    • Wen Yang's avatar
      pvcalls-front: Avoid get_free_pages(GFP_KERNEL) under spinlock · 9f51c05d
      Wen Yang authored
      The problem is that we call this with a spin lock held.
      The call tree is:
      pvcalls_front_accept() holds bedata->socket_lock.
          -> create_active()
              -> __get_free_pages() uses GFP_KERNEL
      
      The create_active() function is only called from pvcalls_front_accept()
      with a spin_lock held, The allocation is not allowed to sleep and
      GFP_KERNEL is not sufficient.
      
      This issue was detected by using the Coccinelle software.
      
      v2: Add a function doing the allocations which is called
          outside the lock and passing the allocated data to
          create_active().
      
      v3: Use the matching deallocators i.e., free_page()
          and free_pages(), respectively.
      
      v4: It would be better to pre-populate map (struct sock_mapping),
          rather than introducing one more new struct.
      
      v5: Since allocating the data outside of this call it should also
          be freed outside, when create_active() fails.
          Move kzalloc(sizeof(*map2), GFP_ATOMIC) outside spinlock and
          use GFP_KERNEL instead.
      
      v6: Drop the superfluous calls.
      Suggested-by: default avatarJuergen Gross <jgross@suse.com>
      Suggested-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Suggested-by: default avatarStefano Stabellini <sstabellini@kernel.org>
      Signed-off-by: default avatarWen Yang <wen.yang99@zte.com.cn>
      Acked-by: default avatarStefano Stabellini <sstabellini@kernel.org>
      CC: Julia Lawall <julia.lawall@lip6.fr>
      CC: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      CC: Juergen Gross <jgross@suse.com>
      CC: Stefano Stabellini <sstabellini@kernel.org>
      CC: xen-devel@lists.xenproject.org
      CC: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      9f51c05d
  6. 04 Jan, 2019 1 commit
  7. 02 Jan, 2019 5 commits
  8. 18 Dec, 2018 3 commits
  9. 17 Dec, 2018 2 commits
  10. 13 Dec, 2018 7 commits
  11. 09 Dec, 2018 17 commits
    • Linus Torvalds's avatar
      Linux 4.20-rc6 · 40e020c1
      Linus Torvalds authored
      40e020c1
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · d48f782e
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "A decent batch of fixes here. I'd say about half are for problems that
        have existed for a while, and half are for new regressions added in
        the 4.20 merge window.
      
         1) Fix 10G SFP phy module detection in mvpp2, from Baruch Siach.
      
         2) Revert bogus emac driver change, from Benjamin Herrenschmidt.
      
         3) Handle BPF exported data structure with pointers when building
            32-bit userland, from Daniel Borkmann.
      
         4) Memory leak fix in act_police, from Davide Caratti.
      
         5) Check RX checksum offload in RX descriptors properly in aquantia
            driver, from Dmitry Bogdanov.
      
         6) SKB unlink fix in various spots, from Edward Cree.
      
         7) ndo_dflt_fdb_dump() only works with ethernet, enforce this, from
            Eric Dumazet.
      
         8) Fix FID leak in mlxsw driver, from Ido Schimmel.
      
         9) IOTLB locking fix in vhost, from Jean-Philippe Brucker.
      
        10) Fix SKB truesize accounting in ipv4/ipv6/netfilter frag memory
            limits otherwise namespace exit can hang. From Jiri Wiesner.
      
        11) Address block parsing length fixes in x25 from Martin Schiller.
      
        12) IRQ and ring accounting fixes in bnxt_en, from Michael Chan.
      
        13) For tun interfaces, only iface delete works with rtnl ops, enforce
            this by disallowing add. From Nicolas Dichtel.
      
        14) Use after free in liquidio, from Pan Bian.
      
        15) Fix SKB use after passing to netif_receive_skb(), from Prashant
            Bhole.
      
        16) Static key accounting and other fixes in XPS from Sabrina Dubroca.
      
        17) Partially initialized flow key passed to ip6_route_output(), from
            Shmulik Ladkani.
      
        18) Fix RTNL deadlock during reset in ibmvnic driver, from Thomas
            Falcon.
      
        19) Several small TCP fixes (off-by-one on window probe abort, NULL
            deref in tail loss probe, SNMP mis-estimations) from Yuchung
            Cheng"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (93 commits)
        net/sched: cls_flower: Reject duplicated rules also under skip_sw
        bnxt_en: Fix _bnxt_get_max_rings() for 57500 chips.
        bnxt_en: Fix NQ/CP rings accounting on the new 57500 chips.
        bnxt_en: Keep track of reserved IRQs.
        bnxt_en: Fix CNP CoS queue regression.
        net/mlx4_core: Correctly set PFC param if global pause is turned off.
        Revert "net/ibm/emac: wrong bit is used for STA control"
        neighbour: Avoid writing before skb->head in neigh_hh_output()
        ipv6: Check available headroom in ip6_xmit() even without options
        tcp: lack of available data can also cause TSO defer
        ipv6: sr: properly initialize flowi6 prior passing to ip6_route_output
        mlxsw: spectrum_switchdev: Fix VLAN device deletion via ioctl
        mlxsw: spectrum_router: Relax GRE decap matching check
        mlxsw: spectrum_switchdev: Avoid leaking FID's reference count
        mlxsw: spectrum_nve: Remove easily triggerable warnings
        ipv4: ipv6: netfilter: Adjust the frag mem limit when truesize changes
        sctp: frag_point sanity check
        tcp: fix NULL ref in tail loss probe
        tcp: Do not underestimate rwnd_limited
        net: use skb_list_del_init() to remove from RX sublists
        ...
      d48f782e
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8586ca8a
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Three fixes: a boot parameter re-(re-)fix, a retpoline build artifact
        fix and an LLVM workaround"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/vdso: Drop implicit common-page-size linker flag
        x86/build: Fix compiler support check for CONFIG_RETPOLINE
        x86/boot: Clear RSDP address in boot_params for broken loaders
      8586ca8a
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ebbd3000
      Linus Torvalds authored
      Pull kprobes fixes from Ingo Molnar:
       "Two kprobes fixes: a blacklist fix and an instruction patching related
        corruption fix"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        kprobes/x86: Blacklist non-attachable interrupt functions
        kprobes/x86: Fix instruction patching corruption when copying more than one RIP-relative instruction
      ebbd3000
    • Linus Torvalds's avatar
      Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4b04e73a
      Linus Torvalds authored
      Pull EFI fixes from Ingo Molnar:
       "Two fixes: a large-system fix and an earlyprintk fix with certain
        resolutions"
      
      * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/earlyprintk/efi: Fix infinite loop on some screen widths
        x86/efi: Allocate e820 buffer before calling efi_exit_boot_service
      4b04e73a
    • Or Gerlitz's avatar
      net/sched: cls_flower: Reject duplicated rules also under skip_sw · 35cc3cef
      Or Gerlitz authored
      Currently, duplicated rules are rejected only for skip_hw or "none",
      hence allowing users to push duplicates into HW for no reason.
      
      Use the flower tables to protect for that.
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarPaul Blakey <paulb@mellanox.com>
      Reported-by: default avatarChris Mi <chrism@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      35cc3cef
    • David S. Miller's avatar
      Merge branch 'bnxt_en-Bug-fixes' · d4b60e94
      David S. Miller authored
      Michael Chan says:
      
      ====================
      bnxt_en: Bug fixes.
      
      The first patch fixes a regression on CoS queue setup, introduced
      recently by the 57500 new chip support patches.  The rest are
      fixes related to ring and resource accounting on the new 57500 chips.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d4b60e94
    • Michael Chan's avatar
      bnxt_en: Fix _bnxt_get_max_rings() for 57500 chips. · e30fbc33
      Michael Chan authored
      The CP rings are accounted differently on the new 57500 chips.  There
      must be enough CP rings for the sum of RX and TX rings on the new
      chips.  The current logic may be over-estimating the RX and TX rings.
      
      The output parameter max_cp should be the maximum NQs capped by
      MSIX vectors available for networking in the context of 57500 chips.
      The existing code which uses CMPL rings capped by the MSIX vectors
      works most of the time but is not always correct.
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e30fbc33
    • Michael Chan's avatar
      bnxt_en: Fix NQ/CP rings accounting on the new 57500 chips. · c0b8cda0
      Michael Chan authored
      The new 57500 chips have introduced the NQ structure in addition to
      the existing CP rings in all chips.  We need to introduce a new
      bnxt_nq_rings_in_use().  On legacy chips, the 2 functions are the
      same and one will just call the other.  On the new chips, they
      refer to the 2 separate ring structures.  The new function is now
      called to determine the resource (NQ or CP rings) associated with
      MSIX that are in use.
      
      On 57500 chips, the RDMA driver does not use the CP rings so
      we don't need to do the subtraction adjustment.
      
      Fixes: 41e8d798 ("bnxt_en: Modify the ring reservation functions for 57500 series chips.")
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c0b8cda0
    • Michael Chan's avatar
      bnxt_en: Keep track of reserved IRQs. · 75720e63
      Michael Chan authored
      The new 57500 chips use 1 NQ per MSIX vector, whereas legacy chips use
      1 CP ring per MSIX vector.  To better unify this, add a resv_irqs
      field to struct bnxt_hw_resc.  On legacy chips, we initialize resv_irqs
      with resv_cp_rings.  On new chips, we initialize it with the allocated
      MSIX resources.
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      75720e63
    • Michael Chan's avatar
      bnxt_en: Fix CNP CoS queue regression. · 804fba4e
      Michael Chan authored
      Recent changes to support the 57500 devices have created this
      regression.  The bnxt_hwrm_queue_qportcfg() call was moved to be
      called earlier before the RDMA support was determined, causing
      the CoS queues configuration to be set before knowing whether RDMA
      was supported or not.  Fix it by moving it to the right place right
      after RDMA support is determined.
      
      Fixes: 98f04cf0 ("bnxt_en: Check context memory requirements from firmware.")
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      804fba4e
    • Linus Torvalds's avatar
      Merge tag 'char-misc-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 0844895a
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are some small driver fixes for 4.20-rc6.
      
        There is a hyperv fix that for some reaon took forever to get into a
        shape that could be applied to the tree properly, but resolves a much
        reported issue. The others are some gnss patches, one a bugfix and the
        two others updates to the MAINTAINERS file to properly match the gnss
        files in the tree.
      
        All have been in linux-next for a while with no reported issues"
      
      * tag 'char-misc-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        MAINTAINERS: exclude gnss from SIRFPRIMA2 regex matching
        MAINTAINERS: add gnss scm tree
        gnss: sirf: fix activation retry handling
        Drivers: hv: vmbus: Offload the handling of channels to two workqueues
      0844895a
    • Linus Torvalds's avatar
      Merge tag 'staging-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 47dcb080
      Linus Torvalds authored
      Pull staging fixes from Greg KH:
       "Here are two staging driver bugfixes for 4.20-rc6.
      
        One is a revert of a previously incorrect patch that was merged a
        while ago, and the other resolves a possible buffer overrun that was
        found by code inspection.
      
        Both of these have been in the linux-next tree with no reported
        issues"
      
      * tag 'staging-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        Revert commit ef9209b6 "staging: rtl8723bs: Fix indenting errors and an off-by-one mistake in core/rtw_mlme_ext.c"
        staging: rtl8712: Fix possible buffer overrun
      47dcb080
    • Linus Torvalds's avatar
      Merge tag 'tty-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 822b7683
      Linus Torvalds authored
      Pull tty driver fixes from Greg KH:
       "Here are three small tty driver fixes for 4.20-rc6
      
        Nothing major, just some bug fixes for reported issues. Full details
        are in the shortlog.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'tty-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        kgdboc: fix KASAN global-out-of-bounds bug in param_set_kgdboc_var()
        tty: serial: 8250_mtk: always resume the device in probe.
        tty: do not set TTY_IO_ERROR flag if console port
      822b7683
    • Linus Torvalds's avatar
      Merge tag 'usb-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 50a5528a
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small USB fixes for 4.20-rc6
      
        The "largest" here are some xhci fixes for reported issues. Also here
        is a USB core fix, some quirk additions, and a usb-serial fix which
        required the export of one of the tty layer's functions to prevent
        code duplication. The tty maintainer agreed with this change.
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'usb-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        xhci: Prevent U1/U2 link pm states if exit latency is too long
        xhci: workaround CSS timeout on AMD SNPS 3.0 xHC
        USB: check usb_get_extra_descriptor for proper size
        USB: serial: console: fix reported terminal settings
        usb: quirk: add no-LPM quirk on SanDisk Ultra Flair device
        USB: Fix invalid-free bug in port_over_current_notify()
        usb: appledisplay: Add 27" Apple Cinema Display
      50a5528a
    • Linus Torvalds's avatar
      Merge tag '4.20-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · bc4caf18
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Three small fixes: a fix for smb3 direct i/o, a fix for CIFS DFS for
        stable and a minor cifs Kconfig fix"
      
      * tag '4.20-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        CIFS: Avoid returning EBUSY to upper layer VFS
        cifs: Fix separator when building path from dentry
        cifs: In Kconfig CONFIG_CIFS_POSIX needs depends on legacy (insecure cifs)
      bc4caf18
    • Linus Torvalds's avatar
      Merge tag 'dax-fixes-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · fa82dcbf
      Linus Torvalds authored
      Pull dax fixes from Dan Williams:
       "The last of the known regression fixes and fallout from the Xarray
        conversion of the filesystem-dax implementation.
      
        On the path to debugging why the dax memory-failure injection test
        started failing after the Xarray conversion a couple more fixes for
        the dax_lock_mapping_entry(), now called dax_lock_page(), surfaced.
        Those plus the bug that started the hunt are now addressed. These
        patches have appeared in a -next release with no issues reported.
      
        Note the touches to mm/memory-failure.c are just the conversion to the
        new function signature for dax_lock_page().
      
        Summary:
      
         - Fix the Xarray conversion of fsdax to properly handle
           dax_lock_mapping_entry() in the presense of pmd entries
      
         - Fix inode destruction racing a new lock request"
      
      * tag 'dax-fixes-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        dax: Fix unlock mismatch with updated API
        dax: Don't access a freed inode
        dax: Check page->mapping isn't NULL
      fa82dcbf