Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1401947 > unrolled thread

[PATCH 4.5 000/101] 4.5.5-stable review

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-05-17 03:50 +0200
Last post2016-05-17 19:30 +0200
Articles 20 on this page of 29 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 4.5 000/101] 4.5.5-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 051/101] crypto: testmgr - Use kmalloc memory for RSA input Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 005/101] net: sched: do not requeue a NULL skb Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 047/101] mm: thp: calculate the mapcount correctly for THP pages during WP faults Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 060/101] pinctrl: at91-pio4: fix pull-up/down logic Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 002/101] decnet: Do not build routes to devices without decnet private data. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 019/101] net/mlx4_en: fix spurious timestamping callbacks Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 009/101] net: use skb_postpush_rcsum instead of own implementations Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 053/101] ALSA: usb-audio: Yet another Phoneix Audio device quirk Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 057/101] spi: pxa2xx: Do not detect number of enabled chip selects on Intel SPT Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 048/101] crypto: qat - fix invalid pf2vf_resp_wq logic Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 055/101] ALSA: hda - Fix white noise on Asus UX501VW headset Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 045/101] ocfs2: fix posix_acl_create deadlock Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 064/101] vfs: add vfs_select_inode() helper Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 062/101] perf diff: Fix duplicated output column Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 046/101] zsmalloc: fix zs_can_compact() integer overflow Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 052/101] ALSA: usb-audio: Quirk for yet another Phoenix Audio devices (v2) Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 023/101] samples/bpf: fix trace_output example Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 041/101] net: thunderx: avoid exposing kernel stack Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 016/101] net/mlx5e: Fix minimum MTU Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 050/101] crypto: hash - Fix page length clamping in hash walk Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 043/101] net/route: enforce hoplimit max value Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 024/101] net: Implement net_dbg_ratelimited() for CONFIG_DYNAMIC_DEBUG case Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 061/101] regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 029/101] sch_dsmark: update backlog as well Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 021/101] bpf: fix refcnt overflow Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    [PATCH 4.5 049/101] crypto: qat - fix adf_ctl_drv.c:undefined reference to adf_init_pf_wq Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-17 03:50 +0200
    Re: [PATCH 4.5 000/101] 4.5.5-stable review Guenter Roeck <linux@roeck-us.net> - 2016-05-17 19:30 +0200
    Re: [PATCH 4.5 000/101] 4.5.5-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2016-05-17 19:30 +0200

Page 1 of 2  [1] 2  Next page →


#1401947 — [PATCH 4.5 000/101] 4.5.5-stable review

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-17 03:50 +0200
Subject[PATCH 4.5 000/101] 4.5.5-stable review
Message-ID<rzBZD-6iF-3@gated-at.bofh.it>
This is the start of the stable review cycle for the 4.5.5 release.
There are 101 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let me know.

Responses should be made by Thu May 19 01:14:44 UTC 2016.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.5.5-rc1.gz
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Linux 4.5.5-rc1

Linus Torvalds <torvalds@linux-foundation.org>
    nf_conntrack: avoid kernel pointer value leak in slab name

Yauhen Kharuzhy <yauhen.kharuzhy@zavadatar.com>
    btrfs: Reset IO error counters before start of device replacing

Josef Bacik <jbacik@fb.com>
    Btrfs: don't use src fd for printk

David Sterba <dsterba@suse.com>
    btrfs: fallback to vmalloc in btrfs_compare_tree

Mark Fasheh <mfasheh@suse.de>
    btrfs: handle non-fatal errors in btrfs_qgroup_inherit()

Liu Bo <bo.li.liu@oracle.com>
    Btrfs: fix invalid reference in replace_path

Alex Lyakas <alex.bolshoy@gmail.com>
    btrfs: do not write corrupted metadata blocks to disk

Alex Lyakas <alex.bolshoy@gmail.com>
    btrfs: csum_tree_block: return proper errno value

Filipe Manana <fdmanana@suse.com>
    Btrfs: do not collect ordered extents when logging that inode exists

Filipe Manana <fdmanana@suse.com>
    Btrfs: fix race when checking if we can skip fsync'ing an inode

Filipe Manana <fdmanana@suse.com>
    Btrfs: fix deadlock between direct IO reads and buffered writes

Filipe Manana <fdmanana@suse.com>
    Btrfs: fix extent_same allowing destination offset beyond i_size

Filipe Manana <fdmanana@suse.com>
    Btrfs: fix file loss on log replay after renaming a file and fsync

Filipe Manana <fdmanana@suse.com>
    Btrfs: fix unreplayable log after snapshot delete + parent dir fsync

David Sterba <dsterba@suse.com>
    btrfs: change max_inline default to 2048

David Sterba <dsterba@suse.com>
    btrfs: remove error message from search ioctl for nonexistent tree

Josef Bacik <jbacik@fb.com>
    Btrfs: fix truncate_space_check

Zhao Lei <zhaolei@cn.fujitsu.com>
    btrfs: reada: Fix in-segment calculation for reada

Alex Deucher <alexander.deucher@amd.com>
    drm/amdgpu: fix DP mode validation

Alex Deucher <alexander.deucher@amd.com>
    drm/radeon: fix DP mode validation

Arindam Nath <arindam.nath@amd.com>
    drm/radeon: fix DP link training issue with second 4K monitor

Imre Deak <imre.deak@intel.com>
    drm/i915/bdw: Add missing delay during L3 SQC credit programming

Lyude <cpaul@redhat.com>
    Revert "drm/i915: start adding dp mst audio"

Daniel Vetter <daniel.vetter@ffwll.ch>
    drm/i915: Bail out of pipe config compute loop on LPT

Lucas Stach <dev@lynxeye.de>
    drm/radeon: fix PLL sharing on DCE6.1 (v2)

Ville Syrjälä <ville.syrjala@linux.intel.com>
    drm/i915: Update CDCLK_FREQ register on BDW after changing cdclk frequency

Mauro Carvalho Chehab <mchehab@osg.samsung.com>
    Revert "[media] videobuf2-v4l2: Verify planes array in buffer dequeueing"

Marek Szyprowski <m.szyprowski@samsung.com>
    Input: max8997-haptic - fix NULL pointer dereference

Al Viro <viro@zeniv.linux.org.uk>
    get_rock_ridge_filename(): handle malformed NM entries

Steven Rostedt <rostedt@goodmis.org>
    tools lib traceevent: Do not reassign parg after collapse_tree()

Johannes Thumshirn <jthumshirn@suse.de>
    qla1280: Don't allocate 512kb of host tags

Al Viro <viro@zeniv.linux.org.uk>
    atomic_open(): fix the handling of create_error

Hans de Goede <hdegoede@redhat.com>
    regulator: axp20x: Fix axp22x ldo_io voltage ranges

Krzysztof Kozlowski <k.kozlowski@samsung.com>
    regulator: s2mps11: Fix invalid selector mask and voltages for buck9

Wanpeng Li <wanpeng.li@hotmail.com>
    workqueue: fix rebind bound workers warning

Boris Brezillon <boris.brezillon@free-electrons.com>
    ARM: dts: at91: sam9x5: Fix the memory range assigned to the PMC

Miklos Szeredi <mszeredi@redhat.com>
    vfs: rename: check backing inode being equal

Miklos Szeredi <mszeredi@redhat.com>
    vfs: add vfs_select_inode() helper

Alexander Shishkin <alexander.shishkin@linux.intel.com>
    perf/core: Disable the event on a truncated AUX record

Namhyung Kim <namhyung@kernel.org>
    perf diff: Fix duplicated output column

Jack Pham <jackp@codeaurora.org>
    regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case

Ludovic Desroches <ludovic.desroches@atmel.com>
    pinctrl: at91-pio4: fix pull-up/down logic

Ben Hutchings <ben.hutchings@codethink.co.uk>
    spi: spi-ti-qspi: Handle truncated frames properly

Ben Hutchings <ben.hutchings@codethink.co.uk>
    spi: spi-ti-qspi: Fix FLEN and WLEN settings if bits_per_word is overridden

Jarkko Nikula <jarkko.nikula@linux.intel.com>
    spi: pxa2xx: Do not detect number of enabled chip selects on Intel SPT

Takashi Iwai <tiwai@suse.de>
    ALSA: hda - Fix broken reconfig

Kaho Ng <ngkaho1234@gmail.com>
    ALSA: hda - Fix white noise on Asus UX501VW headset

Yura Pakhuchiy <pakhuchiy@gmail.com>
    ALSA: hda - Fix subwoofer pin on ASUS N751 and N551

Takashi Iwai <tiwai@suse.de>
    ALSA: usb-audio: Yet another Phoneix Audio device quirk

Takashi Iwai <tiwai@suse.de>
    ALSA: usb-audio: Quirk for yet another Phoenix Audio devices (v2)

Herbert Xu <herbert@gondor.apana.org.au>
    crypto: testmgr - Use kmalloc memory for RSA input

Herbert Xu <herbert@gondor.apana.org.au>
    crypto: hash - Fix page length clamping in hash walk

Tadeusz Struk <tadeusz.struk@intel.com>
    crypto: qat - fix adf_ctl_drv.c:undefined reference to adf_init_pf_wq

Tadeusz Struk <tadeusz.struk@intel.com>
    crypto: qat - fix invalid pf2vf_resp_wq logic

Andrea Arcangeli <aarcange@redhat.com>
    mm: thp: calculate the mapcount correctly for THP pages during WP faults

Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
    zsmalloc: fix zs_can_compact() integer overflow

Junxiao Bi <junxiao.bi@oracle.com>
    ocfs2: fix posix_acl_create deadlock

Junxiao Bi <junxiao.bi@oracle.com>
    ocfs2: revert using ocfs2_acl_chmod to avoid inode cluster lock hang

Paolo Abeni <pabeni@redhat.com>
    net/route: enforce hoplimit max value

Eric Dumazet <edumazet@google.com>
    tcp: refresh skb timestamp at retransmit time

xypron.glpk@gmx.de <xypron.glpk@gmx.de>
    net: thunderx: avoid exposing kernel stack

Kangjie Lu <kangjielu@gmail.com>
    net: fix a kernel infoleak in x25 module

Mikko Rapeli <mikko.rapeli@iki.fi>
    uapi glibc compat: fix compile errors when glibc net/if.h included before linux/if.h

Linus Lüssing <linus.luessing@c0d3.blue>
    bridge: fix igmp / mld query parsing

Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
    net: bridge: fix old ioctl unlocked net device walk

Ian Campbell <ian.campbell@docker.com>
    VSOCK: do not disconnect socket when peer has shutdown SEND only

Daniel Jurgens <danielj@mellanox.com>
    net/mlx4_en: Fix endianness bug in IPV6 csum calculation

Kangjie Lu <kangjielu@gmail.com>
    net: fix infoleak in rtnetlink

Kangjie Lu <kangjielu@gmail.com>
    net: fix infoleak in llc

Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    net: fec: only clear a queue's work bit if the queue was emptied

Nicolas Dichtel <nicolas.dichtel@6wind.com>
    ipv6/ila: fix nlsize calculation for lwtunnel

Neil Horman <nhorman@tuxdriver.com>
    netem: Segment GSO packets on enqueue

WANG Cong <xiyou.wangcong@gmail.com>
    sch_dsmark: update backlog as well

WANG Cong <xiyou.wangcong@gmail.com>
    sch_htb: update backlog as well

WANG Cong <xiyou.wangcong@gmail.com>
    net_sched: update hierarchical backlog too

WANG Cong <xiyou.wangcong@gmail.com>
    net_sched: introduce qdisc_replace() helper

Jiri Benc <jbenc@redhat.com>
    gre: do not pull header in ICMP error processing

Tim Bingham <tbingham@akamai.com>
    net: Implement net_dbg_ratelimited() for CONFIG_DYNAMIC_DEBUG case

Alexei Starovoitov <ast@fb.com>
    samples/bpf: fix trace_output example

Alexei Starovoitov <ast@fb.com>
    bpf: fix check_map_func_compatibility logic

Alexei Starovoitov <ast@fb.com>
    bpf: fix refcnt overflow

Jann Horn <jannh@google.com>
    bpf: fix double-fdput in replace_map_fd_with_map_ptr()

Eric Dumazet <edumazet@google.com>
    net/mlx4_en: fix spurious timestamping callbacks

Paolo Abeni <pabeni@redhat.com>
    ipv4/fib: don't warn when primary address is missing if in_dev is dead

Saeed Mahameed <saeedm@mellanox.com>
    net/mlx5e: Use vport MTU rather than physical port MTU

Saeed Mahameed <saeedm@mellanox.com>
    net/mlx5e: Fix minimum MTU

Saeed Mahameed <saeedm@mellanox.com>
    net/mlx5e: Device's mtu field is u16 and not int

Maor Gottlieb <maorg@mellanox.com>
    net/mlx5_core: Fix soft lockup in steering error flow

Simon Horman <simon.horman@netronome.com>
    openvswitch: use flow protocol when recalculating ipv6 checksums

Ben Hutchings <ben@decadent.org.uk>
    atl2: Disable unimplemented scatter/gather feature

Joe Stringer <joe@ovn.org>
    openvswitch: Orphan skbs before IPv6 defrag

Daniel Borkmann <daniel@iogearbox.net>
    vlan: pull on __vlan_insert_tag error path and fix csum correction

Daniel Borkmann <daniel@iogearbox.net>
    net: use skb_postpush_rcsum instead of own implementations

Craig Gallek <kraig@google.com>
    soreuseport: fix ordering for mixed v4/v6 sockets

Bjørn Mork <bjorn@mork.no>
    cdc_mbim: apply "NDP to end" quirk to all Huawei devices

Alexei Starovoitov <ast@fb.com>
    bpf/verifier: reject invalid LD_ABS | BPF_DW instruction

Lars Persson <lars.persson@axis.com>
    net: sched: do not requeue a NULL skb

Mathias Krause <minipli@googlemail.com>
    packet: fix heap info leak in PACKET_DIAG_MCLIST sock_diag interface

Chris Friesen <chris.friesen@windriver.com>
    route: do not cache fib route info on local routes with oif

David S. Miller <davem@davemloft.net>
    decnet: Do not build routes to devices without decnet private data.

Arnd Bergmann <arnd@arndb.de>
    staging: wilc1000: remove extraneous variable


-------------

Diffstat:

 Makefile                                           |  4 +-
 arch/arm/boot/dts/at91sam9x5.dtsi                  |  2 +-
 crypto/ahash.c                                     |  3 +-
 crypto/testmgr.c                                   | 27 ++++--
 drivers/base/regmap/regmap-spmi.c                  |  2 +-
 drivers/crypto/qat/qat_common/adf_common_drv.h     | 11 +++
 drivers/crypto/qat/qat_common/adf_ctl_drv.c        |  6 ++
 drivers/crypto/qat/qat_common/adf_sriov.c          | 26 +++---
 drivers/gpu/drm/amd/amdgpu/atombios_dp.c           |  4 +-
 drivers/gpu/drm/i915/i915_debugfs.c                | 16 ----
 drivers/gpu/drm/i915/i915_reg.h                    |  2 +
 drivers/gpu/drm/i915/intel_audio.c                 |  9 +-
 drivers/gpu/drm/i915/intel_crt.c                   |  8 +-
 drivers/gpu/drm/i915/intel_ddi.c                   | 24 ++----
 drivers/gpu/drm/i915/intel_display.c               |  2 +
 drivers/gpu/drm/i915/intel_dp_mst.c                | 22 -----
 drivers/gpu/drm/i915/intel_drv.h                   |  2 -
 drivers/gpu/drm/i915/intel_pm.c                    |  6 ++
 drivers/gpu/drm/radeon/atombios_crtc.c             | 10 +++
 drivers/gpu/drm/radeon/atombios_dp.c               |  4 +-
 drivers/gpu/drm/radeon/radeon_dp_auxch.c           |  2 +-
 drivers/infiniband/hw/mlx5/main.c                  |  4 +-
 drivers/input/misc/max8997_haptic.c                |  6 +-
 drivers/media/v4l2-core/videobuf2-v4l2.c           |  6 --
 drivers/net/ethernet/atheros/atlx/atl2.c           |  2 +-
 drivers/net/ethernet/cavium/thunder/nicvf_queues.c |  4 +
 drivers/net/ethernet/freescale/fec_main.c          | 10 ++-
 drivers/net/ethernet/mellanox/mlx4/en_rx.c         |  2 +-
 drivers/net/ethernet/mellanox/mlx4/en_tx.c         |  6 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c  | 57 ++++++++++---
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c  | 46 ++++------
 drivers/net/ethernet/mellanox/mlx5/core/port.c     | 10 +--
 drivers/net/ethernet/mellanox/mlx5/core/vport.c    | 40 +++++++++
 drivers/net/usb/cdc_mbim.c                         |  9 +-
 drivers/pinctrl/pinctrl-at91-pio4.c                |  2 +
 drivers/regulator/axp20x-regulator.c               |  4 +-
 drivers/regulator/s2mps11.c                        | 28 ++++--
 drivers/scsi/qla1280.c                             |  2 +-
 drivers/spi/spi-pxa2xx.c                           |  2 +-
 drivers/spi/spi-ti-qspi.c                          | 45 ++++++----
 drivers/staging/wilc1000/wilc_spi.c                |  2 -
 fs/btrfs/ctree.c                                   | 12 ++-
 fs/btrfs/ctree.h                                   |  2 +-
 fs/btrfs/dev-replace.c                             |  2 +
 fs/btrfs/disk-io.c                                 | 28 +++---
 fs/btrfs/file.c                                    |  9 +-
 fs/btrfs/inode.c                                   | 36 +++++++-
 fs/btrfs/ioctl.c                                   | 10 ++-
 fs/btrfs/qgroup.c                                  | 54 +++++++-----
 fs/btrfs/reada.c                                   |  4 +-
 fs/btrfs/relocation.c                              |  1 +
 fs/btrfs/tree-log.c                                | 99 +++++++++++++++++++---
 fs/btrfs/tree-log.h                                |  2 +
 fs/isofs/rock.c                                    | 13 ++-
 fs/namei.c                                         | 26 ++----
 fs/ocfs2/acl.c                                     | 87 +++++++++++++++++++
 fs/ocfs2/acl.h                                     |  5 ++
 fs/ocfs2/file.c                                    |  4 +-
 fs/ocfs2/namei.c                                   | 23 +----
 fs/ocfs2/refcounttree.c                            | 17 +---
 fs/ocfs2/xattr.c                                   | 14 ++-
 fs/ocfs2/xattr.h                                   |  4 +-
 fs/open.c                                          | 12 +--
 include/linux/bpf.h                                |  3 +-
 include/linux/dcache.h                             | 12 +++
 include/linux/mfd/samsung/s2mps11.h                |  2 +
 include/linux/mlx5/driver.h                        |  6 +-
 include/linux/mlx5/vport.h                         |  2 +
 include/linux/mm.h                                 |  9 ++
 include/linux/net.h                                | 10 ++-
 include/linux/rculist_nulls.h                      | 39 +++++++++
 include/linux/swap.h                               |  6 +-
 include/net/codel.h                                |  4 +
 include/net/sch_generic.h                          | 20 ++++-
 include/net/sock.h                                 |  6 +-
 include/uapi/linux/if.h                            | 28 ++++++
 include/uapi/linux/libc-compat.h                   | 44 ++++++++++
 kernel/bpf/inode.c                                 |  7 +-
 kernel/bpf/syscall.c                               | 24 +++++-
 kernel/bpf/verifier.c                              | 66 +++++++++------
 kernel/events/ring_buffer.c                        | 10 ++-
 kernel/workqueue.c                                 | 11 +++
 mm/huge_memory.c                                   | 71 ++++++++++++++--
 mm/memory.c                                        | 22 +++--
 mm/swapfile.c                                      | 13 +--
 mm/zsmalloc.c                                      |  7 +-
 net/bridge/br_ioctl.c                              |  5 +-
 net/bridge/br_multicast.c                          | 12 +--
 net/core/rtnetlink.c                               | 18 ++--
 net/core/skbuff.c                                  | 11 +--
 net/decnet/dn_route.c                              |  9 +-
 net/ipv4/fib_frontend.c                            |  6 +-
 net/ipv4/fib_semantics.c                           |  2 +
 net/ipv4/ip_gre.c                                  | 11 ++-
 net/ipv4/route.c                                   | 12 +++
 net/ipv4/tcp_output.c                              |  6 +-
 net/ipv4/udp.c                                     |  9 +-
 net/ipv6/ila/ila_lwt.c                             |  3 +-
 net/ipv6/reassembly.c                              |  6 +-
 net/ipv6/route.c                                   |  2 +
 net/llc/af_llc.c                                   |  1 +
 net/netfilter/nf_conntrack_core.c                  |  4 +-
 net/openvswitch/actions.c                          | 12 ++-
 net/openvswitch/conntrack.c                        |  1 +
 net/openvswitch/vport-netdev.c                     |  2 +-
 net/openvswitch/vport.h                            |  7 --
 net/packet/af_packet.c                             |  1 +
 net/sched/sch_api.c                                |  8 +-
 net/sched/sch_cbq.c                                | 12 +--
 net/sched/sch_choke.c                              |  6 +-
 net/sched/sch_codel.c                              | 10 ++-
 net/sched/sch_drr.c                                |  9 +-
 net/sched/sch_dsmark.c                             | 11 +--
 net/sched/sch_fq.c                                 |  4 +-
 net/sched/sch_fq_codel.c                           | 17 ++--
 net/sched/sch_generic.c                            |  5 +-
 net/sched/sch_hfsc.c                               |  9 +-
 net/sched/sch_hhf.c                                | 10 ++-
 net/sched/sch_htb.c                                | 24 +++---
 net/sched/sch_multiq.c                             | 16 ++--
 net/sched/sch_netem.c                              | 74 +++++++++++++---
 net/sched/sch_pie.c                                |  5 +-
 net/sched/sch_prio.c                               | 15 ++--
 net/sched/sch_qfq.c                                |  9 +-
 net/sched/sch_red.c                                | 10 +--
 net/sched/sch_sfb.c                                | 10 +--
 net/sched/sch_sfq.c                                | 16 ++--
 net/sched/sch_tbf.c                                | 15 ++--
 net/vmw_vsock/af_vsock.c                           | 21 +----
 net/x25/x25_facilities.c                           |  1 +
 samples/bpf/trace_output_kern.c                    |  1 -
 sound/pci/hda/hda_sysfs.c                          |  8 --
 sound/pci/hda/patch_realtek.c                      | 13 +++
 sound/usb/quirks.c                                 |  3 +
 tools/lib/traceevent/parse-filter.c                |  4 +-
 tools/perf/util/sort.c                             |  3 +
 136 files changed, 1251 insertions(+), 603 deletions(-)

[toc] | [next] | [standalone]


#1401948 — [PATCH 4.5 051/101] crypto: testmgr - Use kmalloc memory for RSA input

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-17 03:50 +0200
Subject[PATCH 4.5 051/101] crypto: testmgr - Use kmalloc memory for RSA input
Message-ID<rzCj0-6q8-9@gated-at.bofh.it>
In reply to#1401947
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Herbert Xu <herbert@gondor.apana.org.au>

commit df27b26f04ed388ff4cc2b5d8cfdb5d97678816f upstream.

As akcipher uses an SG interface, you must not use vmalloc memory
as input for it.  This patch fixes testmgr to copy the vmalloc
test vectors to kmalloc memory before running the test.

This patch also removes a superfluous sg_virt call in do_test_rsa.

Reported-by: Anatoly Pugachev <matorola@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 crypto/testmgr.c |   27 ++++++++++++++++++++++-----
 1 file changed, 22 insertions(+), 5 deletions(-)

--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -1849,6 +1849,7 @@ static int alg_test_drbg(const struct al
 static int do_test_rsa(struct crypto_akcipher *tfm,
 		       struct akcipher_testvec *vecs)
 {
+	char *xbuf[XBUFSIZE];
 	struct akcipher_request *req;
 	void *outbuf_enc = NULL;
 	void *outbuf_dec = NULL;
@@ -1857,9 +1858,12 @@ static int do_test_rsa(struct crypto_akc
 	int err = -ENOMEM;
 	struct scatterlist src, dst, src_tab[2];
 
+	if (testmgr_alloc_buf(xbuf))
+		return err;
+
 	req = akcipher_request_alloc(tfm, GFP_KERNEL);
 	if (!req)
-		return err;
+		goto free_xbuf;
 
 	init_completion(&result.completion);
 
@@ -1877,9 +1881,14 @@ static int do_test_rsa(struct crypto_akc
 	if (!outbuf_enc)
 		goto free_req;
 
+	if (WARN_ON(vecs->m_size > PAGE_SIZE))
+		goto free_all;
+
+	memcpy(xbuf[0], vecs->m, vecs->m_size);
+
 	sg_init_table(src_tab, 2);
-	sg_set_buf(&src_tab[0], vecs->m, 8);
-	sg_set_buf(&src_tab[1], vecs->m + 8, vecs->m_size - 8);
+	sg_set_buf(&src_tab[0], xbuf[0], 8);
+	sg_set_buf(&src_tab[1], xbuf[0] + 8, vecs->m_size - 8);
 	sg_init_one(&dst, outbuf_enc, out_len_max);
 	akcipher_request_set_crypt(req, src_tab, &dst, vecs->m_size,
 				   out_len_max);
@@ -1898,7 +1907,7 @@ static int do_test_rsa(struct crypto_akc
 		goto free_all;
 	}
 	/* verify that encrypted message is equal to expected */
-	if (memcmp(vecs->c, sg_virt(req->dst), vecs->c_size)) {
+	if (memcmp(vecs->c, outbuf_enc, vecs->c_size)) {
 		pr_err("alg: rsa: encrypt test failed. Invalid output\n");
 		err = -EINVAL;
 		goto free_all;
@@ -1913,7 +1922,13 @@ static int do_test_rsa(struct crypto_akc
 		err = -ENOMEM;
 		goto free_all;
 	}
-	sg_init_one(&src, vecs->c, vecs->c_size);
+
+	if (WARN_ON(vecs->c_size > PAGE_SIZE))
+		goto free_all;
+
+	memcpy(xbuf[0], vecs->c, vecs->c_size);
+
+	sg_init_one(&src, xbuf[0], vecs->c_size);
 	sg_init_one(&dst, outbuf_dec, out_len_max);
 	init_completion(&result.completion);
 	akcipher_request_set_crypt(req, &src, &dst, vecs->c_size, out_len_max);
@@ -1940,6 +1955,8 @@ free_all:
 	kfree(outbuf_enc);
 free_req:
 	akcipher_request_free(req);
+free_xbuf:
+	testmgr_free_buf(xbuf);
 	return err;
 }
 

[toc] | [prev] | [next] | [standalone]


#1401949 — [PATCH 4.5 005/101] net: sched: do not requeue a NULL skb

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-17 03:50 +0200
Subject[PATCH 4.5 005/101] net: sched: do not requeue a NULL skb
Message-ID<rzCj0-6q8-11@gated-at.bofh.it>
In reply to#1401947
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Lars Persson <lars.persson@axis.com>

[ Upstream commit 3dcd493fbebfd631913df6e2773cc295d3bf7d22 ]

A failure in validate_xmit_skb_list() triggered an unconditional call
to dev_requeue_skb with skb=NULL. This slowly grows the queue
discipline's qlen count until all traffic through the queue stops.

We take the optimistic approach and continue running the queue after a
failure since it is unknown if later packets also will fail in the
validate path.

Fixes: 55a93b3ea780 ("qdisc: validate skb without holding lock")
Signed-off-by: Lars Persson <larper@axis.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/sched/sch_generic.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -159,12 +159,15 @@ int sch_direct_xmit(struct sk_buff *skb,
 	if (validate)
 		skb = validate_xmit_skb_list(skb, dev);
 
-	if (skb) {
+	if (likely(skb)) {
 		HARD_TX_LOCK(dev, txq, smp_processor_id());
 		if (!netif_xmit_frozen_or_stopped(txq))
 			skb = dev_hard_start_xmit(skb, dev, txq, &ret);
 
 		HARD_TX_UNLOCK(dev, txq);
+	} else {
+		spin_lock(root_lock);
+		return qdisc_qlen(q);
 	}
 	spin_lock(root_lock);
 

[toc] | [prev] | [next] | [standalone]


#1401950 — [PATCH 4.5 047/101] mm: thp: calculate the mapcount correctly for THP pages during WP faults

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-17 03:50 +0200
Subject[PATCH 4.5 047/101] mm: thp: calculate the mapcount correctly for THP pages during WP faults
Message-ID<rzCj0-6q8-13@gated-at.bofh.it>
In reply to#1401947
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Andrea Arcangeli <aarcange@redhat.com>

commit 6d0a07edd17cfc12fdc1f36de8072fa17cc3666f upstream.

This will provide fully accuracy to the mapcount calculation in the
write protect faults, so page pinning will not get broken by false
positive copy-on-writes.

total_mapcount() isn't the right calculation needed in
reuse_swap_page(), so this introduces a page_trans_huge_mapcount()
that is effectively the full accurate return value for page_mapcount()
if dealing with Transparent Hugepages, however we only use the
page_trans_huge_mapcount() during COW faults where it strictly needed,
due to its higher runtime cost.

This also provide at practical zero cost the total_mapcount
information which is needed to know if we can still relocate the page
anon_vma to the local vma. If page_trans_huge_mapcount() returns 1 we
can reuse the page no matter if it's a pte or a pmd_trans_huge
triggering the fault, but we can only relocate the page anon_vma to
the local vma->anon_vma if we're sure it's only this "vma" mapping the
whole THP physical range.

Kirill A. Shutemov discovered the problem with moving the page
anon_vma to the local vma->anon_vma in a previous version of this
patch and another problem in the way page_move_anon_rmap() was called.

Andrew Morton discovered that CONFIG_SWAP=n wouldn't build in a
previous version, because reuse_swap_page must be a macro to call
page_trans_huge_mapcount from swap.h, so this uses a macro again
instead of an inline function. With this change at least it's a less
dangerous usage than it was before, because "page" is used only once
now, while with the previous code reuse_swap_page(page++) would have
called page_mapcount on page+1 and it would have increased page twice
instead of just once.

Dean Luick noticed an uninitialized variable that could result in a
rmap inefficiency for the non-THP case in a previous version.

Mike Marciniszyn said:

: Our RDMA tests are seeing an issue with memory locking that bisects to
: commit 61f5d698cc97 ("mm: re-enable THP")
:
: The test program registers two rather large MRs (512M) and RDMA
: writes data to a passive peer using the first and RDMA reads it back
: into the second MR and compares that data.  The sizes are chosen randomly
: between 0 and 1024 bytes.
:
: The test will get through a few (<= 4 iterations) and then gets a
: compare error.
:
: Tracing indicates the kernel logical addresses associated with the individual
: pages at registration ARE correct , the data in the "RDMA read response only"
: packets ARE correct.
:
: The "corruption" occurs when the packet crosse two pages that are not physically
: contiguous.   The second page reads back as zero in the program.
:
: It looks like the user VA at the point of the compare error no longer points to
: the same physical address as was registered.
:
: This patch totally resolves the issue!

Link: http://lkml.kernel.org/r/1462547040-1737-2-git-send-email-aarcange@redhat.com
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Reviewed-by: "Kirill A. Shutemov" <kirill@shutemov.name>
Reviewed-by: Dean Luick <dean.luick@intel.com>
Tested-by: Alex Williamson <alex.williamson@redhat.com>
Tested-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Tested-by: Josh Collier <josh.d.collier@intel.com>
Cc: Marc Haber <mh+linux-kernel@zugschlus.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 include/linux/mm.h   |    9 ++++++
 include/linux/swap.h |    6 ++--
 mm/huge_memory.c     |   71 ++++++++++++++++++++++++++++++++++++++++++++-------
 mm/memory.c          |   22 ++++++++++-----
 mm/swapfile.c        |   13 +++++----
 5 files changed, 95 insertions(+), 26 deletions(-)

--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -456,11 +456,20 @@ static inline int page_mapcount(struct p
 
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
 int total_mapcount(struct page *page);
+int page_trans_huge_mapcount(struct page *page, int *total_mapcount);
 #else
 static inline int total_mapcount(struct page *page)
 {
 	return page_mapcount(page);
 }
+static inline int page_trans_huge_mapcount(struct page *page,
+					   int *total_mapcount)
+{
+	int mapcount = page_mapcount(page);
+	if (total_mapcount)
+		*total_mapcount = mapcount;
+	return mapcount;
+}
 #endif
 
 static inline int page_count(struct page *page)
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -418,7 +418,7 @@ extern sector_t swapdev_block(int, pgoff
 extern int page_swapcount(struct page *);
 extern int swp_swapcount(swp_entry_t entry);
 extern struct swap_info_struct *page_swap_info(struct page *);
-extern int reuse_swap_page(struct page *);
+extern bool reuse_swap_page(struct page *, int *);
 extern int try_to_free_swap(struct page *);
 struct backing_dev_info;
 
@@ -513,8 +513,8 @@ static inline int swp_swapcount(swp_entr
 	return 0;
 }
 
-#define reuse_swap_page(page) \
-	(!PageTransCompound(page) && page_mapcount(page) == 1)
+#define reuse_swap_page(page, total_mapcount) \
+	(page_trans_huge_mapcount(page, total_mapcount) == 1)
 
 static inline int try_to_free_swap(struct page *page)
 {
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1257,15 +1257,9 @@ int do_huge_pmd_wp_page(struct mm_struct
 	VM_BUG_ON_PAGE(!PageCompound(page) || !PageHead(page), page);
 	/*
 	 * We can only reuse the page if nobody else maps the huge page or it's
-	 * part. We can do it by checking page_mapcount() on each sub-page, but
-	 * it's expensive.
-	 * The cheaper way is to check page_count() to be equal 1: every
-	 * mapcount takes page reference reference, so this way we can
-	 * guarantee, that the PMD is the only mapping.
-	 * This can give false negative if somebody pinned the page, but that's
-	 * fine.
+	 * part.
 	 */
-	if (page_mapcount(page) == 1 && page_count(page) == 1) {
+	if (page_trans_huge_mapcount(page, NULL) == 1) {
 		pmd_t entry;
 		entry = pmd_mkyoung(orig_pmd);
 		entry = maybe_pmd_mkwrite(pmd_mkdirty(entry), vma);
@@ -2038,7 +2032,8 @@ static int __collapse_huge_page_isolate(
 		if (pte_write(pteval)) {
 			writable = true;
 		} else {
-			if (PageSwapCache(page) && !reuse_swap_page(page)) {
+			if (PageSwapCache(page) &&
+			    !reuse_swap_page(page, NULL)) {
 				unlock_page(page);
 				result = SCAN_SWAP_CACHE_PAGE;
 				goto out;
@@ -3337,6 +3332,64 @@ int total_mapcount(struct page *page)
 	return ret;
 }
 
+/*
+ * This calculates accurately how many mappings a transparent hugepage
+ * has (unlike page_mapcount() which isn't fully accurate). This full
+ * accuracy is primarily needed to know if copy-on-write faults can
+ * reuse the page and change the mapping to read-write instead of
+ * copying them. At the same time this returns the total_mapcount too.
+ *
+ * The function returns the highest mapcount any one of the subpages
+ * has. If the return value is one, even if different processes are
+ * mapping different subpages of the transparent hugepage, they can
+ * all reuse it, because each process is reusing a different subpage.
+ *
+ * The total_mapcount is instead counting all virtual mappings of the
+ * subpages. If the total_mapcount is equal to "one", it tells the
+ * caller all mappings belong to the same "mm" and in turn the
+ * anon_vma of the transparent hugepage can become the vma->anon_vma
+ * local one as no other process may be mapping any of the subpages.
+ *
+ * It would be more accurate to replace page_mapcount() with
+ * page_trans_huge_mapcount(), however we only use
+ * page_trans_huge_mapcount() in the copy-on-write faults where we
+ * need full accuracy to avoid breaking page pinning, because
+ * page_trans_huge_mapcount() is slower than page_mapcount().
+ */
+int page_trans_huge_mapcount(struct page *page, int *total_mapcount)
+{
+	int i, ret, _total_mapcount, mapcount;
+
+	/* hugetlbfs shouldn't call it */
+	VM_BUG_ON_PAGE(PageHuge(page), page);
+
+	if (likely(!PageTransCompound(page))) {
+		mapcount = atomic_read(&page->_mapcount) + 1;
+		if (total_mapcount)
+			*total_mapcount = mapcount;
+		return mapcount;
+	}
+
+	page = compound_head(page);
+
+	_total_mapcount = ret = 0;
+	for (i = 0; i < HPAGE_PMD_NR; i++) {
+		mapcount = atomic_read(&page[i]._mapcount) + 1;
+		ret = max(ret, mapcount);
+		_total_mapcount += mapcount;
+	}
+	if (PageDoubleMap(page)) {
+		ret -= 1;
+		_total_mapcount -= HPAGE_PMD_NR;
+	}
+	mapcount = compound_mapcount(page);
+	ret += mapcount;
+	_total_mapcount += mapcount;
+	if (total_mapcount)
+		*total_mapcount = _total_mapcount;
+	return ret;
+}
+
 /*
  * This function splits huge page into normal pages. @page can point to any
  * subpage of huge page to split. Split doesn't change the position of @page.
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2357,6 +2357,7 @@ static int do_wp_page(struct mm_struct *
 	 * not dirty accountable.
 	 */
 	if (PageAnon(old_page) && !PageKsm(old_page)) {
+		int total_mapcount;
 		if (!trylock_page(old_page)) {
 			page_cache_get(old_page);
 			pte_unmap_unlock(page_table, ptl);
@@ -2371,13 +2372,18 @@ static int do_wp_page(struct mm_struct *
 			}
 			page_cache_release(old_page);
 		}
-		if (reuse_swap_page(old_page)) {
-			/*
-			 * The page is all ours.  Move it to our anon_vma so
-			 * the rmap code will not search our parent or siblings.
-			 * Protected against the rmap code by the page lock.
-			 */
-			page_move_anon_rmap(old_page, vma, address);
+		if (reuse_swap_page(old_page, &total_mapcount)) {
+			if (total_mapcount == 1) {
+				/*
+				 * The page is all ours. Move it to
+				 * our anon_vma so the rmap code will
+				 * not search our parent or siblings.
+				 * Protected against the rmap code by
+				 * the page lock.
+				 */
+				page_move_anon_rmap(compound_head(old_page),
+						    vma, address);
+			}
 			unlock_page(old_page);
 			return wp_page_reuse(mm, vma, address, page_table, ptl,
 					     orig_pte, old_page, 0, 0);
@@ -2602,7 +2608,7 @@ static int do_swap_page(struct mm_struct
 	inc_mm_counter_fast(mm, MM_ANONPAGES);
 	dec_mm_counter_fast(mm, MM_SWAPENTS);
 	pte = mk_pte(page, vma->vm_page_prot);
-	if ((flags & FAULT_FLAG_WRITE) && reuse_swap_page(page)) {
+	if ((flags & FAULT_FLAG_WRITE) && reuse_swap_page(page, NULL)) {
 		pte = maybe_mkwrite(pte_mkdirty(pte), vma);
 		flags &= ~FAULT_FLAG_WRITE;
 		ret |= VM_FAULT_WRITE;
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -916,18 +916,19 @@ out:
  * to it.  And as a side-effect, free up its swap: because the old content
  * on disk will never be read, and seeking back there to write new content
  * later would only waste time away from clustering.
+ *
+ * NOTE: total_mapcount should not be relied upon by the caller if
+ * reuse_swap_page() returns false, but it may be always overwritten
+ * (see the other implementation for CONFIG_SWAP=n).
  */
-int reuse_swap_page(struct page *page)
+bool reuse_swap_page(struct page *page, int *total_mapcount)
 {
 	int count;
 
 	VM_BUG_ON_PAGE(!PageLocked(page), page);
 	if (unlikely(PageKsm(page)))
-		return 0;
-	/* The page is part of THP and cannot be reused */
-	if (PageTransCompound(page))
-		return 0;
-	count = page_mapcount(page);
+		return false;
+	count = page_trans_huge_mapcount(page, total_mapcount);
 	if (count <= 1 && PageSwapCache(page)) {
 		count += page_swapcount(page);
 		if (count == 1 && !PageWriteback(page)) {

[toc] | [prev] | [next] | [standalone]


#1401952 — [PATCH 4.5 060/101] pinctrl: at91-pio4: fix pull-up/down logic

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-17 03:50 +0200
Subject[PATCH 4.5 060/101] pinctrl: at91-pio4: fix pull-up/down logic
Message-ID<rzCj0-6q8-21@gated-at.bofh.it>
In reply to#1401947
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Ludovic Desroches <ludovic.desroches@atmel.com>

commit 5305a7b7e860bb40ab226bc7d58019416073948a upstream.

The default configuration of a pin is often with a value in the
pull-up/down field at chip reset. So, even if the internal logic of the
controller prevents writing a configuration with pull-up and pull-down at
the same time, we must ensure explicitly this condition before writing the
register.

This was leading to a pull-down condition not taken into account for
instance.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Fixes: 776180848b57 ("pinctrl: introduce driver for Atmel PIO4 controller")
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pinctrl/pinctrl-at91-pio4.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/pinctrl/pinctrl-at91-pio4.c
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -722,9 +722,11 @@ static int atmel_conf_pin_config_group_s
 			break;
 		case PIN_CONFIG_BIAS_PULL_UP:
 			conf |= ATMEL_PIO_PUEN_MASK;
+			conf &= (~ATMEL_PIO_PDEN_MASK);
 			break;
 		case PIN_CONFIG_BIAS_PULL_DOWN:
 			conf |= ATMEL_PIO_PDEN_MASK;
+			conf &= (~ATMEL_PIO_PUEN_MASK);
 			break;
 		case PIN_CONFIG_DRIVE_OPEN_DRAIN:
 			if (arg == 0)

[toc] | [prev] | [next] | [standalone]


#1401953 — [PATCH 4.5 002/101] decnet: Do not build routes to devices without decnet private data.

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-17 03:50 +0200
Subject[PATCH 4.5 002/101] decnet: Do not build routes to devices without decnet private data.
Message-ID<rzCj1-6q8-23@gated-at.bofh.it>
In reply to#1401947
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: "David S. Miller" <davem@davemloft.net>

[ Upstream commit a36a0d4008488fa545c74445d69eaf56377d5d4e ]

In particular, make sure we check for decnet private presence
for loopback devices.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/decnet/dn_route.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -1034,10 +1034,13 @@ source_ok:
 	if (!fld.daddr) {
 		fld.daddr = fld.saddr;
 
-		err = -EADDRNOTAVAIL;
 		if (dev_out)
 			dev_put(dev_out);
+		err = -EINVAL;
 		dev_out = init_net.loopback_dev;
+		if (!dev_out->dn_ptr)
+			goto out;
+		err = -EADDRNOTAVAIL;
 		dev_hold(dev_out);
 		if (!fld.daddr) {
 			fld.daddr =
@@ -1110,6 +1113,8 @@ source_ok:
 		if (dev_out == NULL)
 			goto out;
 		dn_db = rcu_dereference_raw(dev_out->dn_ptr);
+		if (!dn_db)
+			goto e_inval;
 		/* Possible improvement - check all devices for local addr */
 		if (dn_dev_islocal(dev_out, fld.daddr)) {
 			dev_put(dev_out);
@@ -1151,6 +1156,8 @@ select_source:
 			dev_put(dev_out);
 		dev_out = init_net.loopback_dev;
 		dev_hold(dev_out);
+		if (!dev_out->dn_ptr)
+			goto e_inval;
 		fld.flowidn_oif = dev_out->ifindex;
 		if (res.fi)
 			dn_fib_info_put(res.fi);

[toc] | [prev] | [next] | [standalone]


#1401954 — [PATCH 4.5 019/101] net/mlx4_en: fix spurious timestamping callbacks

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-17 03:50 +0200
Subject[PATCH 4.5 019/101] net/mlx4_en: fix spurious timestamping callbacks
Message-ID<rzCj1-6q8-25@gated-at.bofh.it>
In reply to#1401947
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Eric Dumazet <edumazet@google.com>

[ Upstream commit fc96256c906362e845d848d0f6a6354450059e81 ]

When multiple skb are TX-completed in a row, we might incorrectly keep
a timestamp of a prior skb and cause extra work.

Fixes: ec693d47010e8 ("net/mlx4_en: Add HW timestamping (TS) support")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/mellanox/mlx4/en_tx.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
@@ -402,7 +402,6 @@ static bool mlx4_en_process_tx_cq(struct
 	u32 packets = 0;
 	u32 bytes = 0;
 	int factor = priv->cqe_factor;
-	u64 timestamp = 0;
 	int done = 0;
 	int budget = priv->tx_work_limit;
 	u32 last_nr_txbb;
@@ -442,9 +441,12 @@ static bool mlx4_en_process_tx_cq(struct
 		new_index = be16_to_cpu(cqe->wqe_index) & size_mask;
 
 		do {
+			u64 timestamp = 0;
+
 			txbbs_skipped += last_nr_txbb;
 			ring_index = (ring_index + last_nr_txbb) & size_mask;
-			if (ring->tx_info[ring_index].ts_requested)
+
+			if (unlikely(ring->tx_info[ring_index].ts_requested))
 				timestamp = mlx4_en_get_cqe_ts(cqe);
 
 			/* free next descriptor */

[toc] | [prev] | [next] | [standalone]


#1401956 — [PATCH 4.5 009/101] net: use skb_postpush_rcsum instead of own implementations

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-17 03:50 +0200
Subject[PATCH 4.5 009/101] net: use skb_postpush_rcsum instead of own implementations
Message-ID<rzCj1-6q8-29@gated-at.bofh.it>
In reply to#1401947
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Daniel Borkmann <daniel@iogearbox.net>

[ Upstream commit 6b83d28a55a891a9d70fc61ccb1c138e47dcbe74 ]

Replace individual implementations with the recently introduced
skb_postpush_rcsum() helper.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Tom Herbert <tom@herbertland.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/core/skbuff.c              |    4 +---
 net/ipv6/reassembly.c          |    6 ++----
 net/openvswitch/actions.c      |    8 +++-----
 net/openvswitch/vport-netdev.c |    2 +-
 net/openvswitch/vport.h        |    7 -------
 5 files changed, 7 insertions(+), 20 deletions(-)

--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -4433,9 +4433,7 @@ int skb_vlan_push(struct sk_buff *skb, _
 		skb->mac_len += VLAN_HLEN;
 		__skb_pull(skb, offset);
 
-		if (skb->ip_summed == CHECKSUM_COMPLETE)
-			skb->csum = csum_add(skb->csum, csum_partial(skb->data
-					+ (2 * ETH_ALEN), VLAN_HLEN, 0));
+		skb_postpush_rcsum(skb, skb->data + (2 * ETH_ALEN), VLAN_HLEN);
 	}
 	__vlan_hwaccel_put_tag(skb, vlan_proto, vlan_tci);
 	return 0;
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -496,10 +496,8 @@ static int ip6_frag_reasm(struct frag_qu
 	IP6CB(head)->flags |= IP6SKB_FRAGMENTED;
 
 	/* Yes, and fold redundant checksum back. 8) */
-	if (head->ip_summed == CHECKSUM_COMPLETE)
-		head->csum = csum_partial(skb_network_header(head),
-					  skb_network_header_len(head),
-					  head->csum);
+	skb_postpush_rcsum(head, skb_network_header(head),
+			   skb_network_header_len(head));
 
 	rcu_read_lock();
 	IP6_INC_STATS_BH(net, __in6_dev_get(dev), IPSTATS_MIB_REASMOKS);
--- a/net/openvswitch/actions.c
+++ b/net/openvswitch/actions.c
@@ -158,9 +158,7 @@ static int push_mpls(struct sk_buff *skb
 	new_mpls_lse = (__be32 *)skb_mpls_header(skb);
 	*new_mpls_lse = mpls->mpls_lse;
 
-	if (skb->ip_summed == CHECKSUM_COMPLETE)
-		skb->csum = csum_add(skb->csum, csum_partial(new_mpls_lse,
-							     MPLS_HLEN, 0));
+	skb_postpush_rcsum(skb, new_mpls_lse, MPLS_HLEN);
 
 	hdr = eth_hdr(skb);
 	hdr->h_proto = mpls->mpls_ethertype;
@@ -280,7 +278,7 @@ static int set_eth_addr(struct sk_buff *
 	ether_addr_copy_masked(eth_hdr(skb)->h_dest, key->eth_dst,
 			       mask->eth_dst);
 
-	ovs_skb_postpush_rcsum(skb, eth_hdr(skb), ETH_ALEN * 2);
+	skb_postpush_rcsum(skb, eth_hdr(skb), ETH_ALEN * 2);
 
 	ether_addr_copy(flow_key->eth.src, eth_hdr(skb)->h_source);
 	ether_addr_copy(flow_key->eth.dst, eth_hdr(skb)->h_dest);
@@ -639,7 +637,7 @@ static int ovs_vport_output(struct net *
 	/* Reconstruct the MAC header.  */
 	skb_push(skb, data->l2_len);
 	memcpy(skb->data, &data->l2_data, data->l2_len);
-	ovs_skb_postpush_rcsum(skb, skb->data, data->l2_len);
+	skb_postpush_rcsum(skb, skb->data, data->l2_len);
 	skb_reset_mac_header(skb);
 
 	ovs_vport_send(vport, skb);
--- a/net/openvswitch/vport-netdev.c
+++ b/net/openvswitch/vport-netdev.c
@@ -58,7 +58,7 @@ static void netdev_port_receive(struct s
 		return;
 
 	skb_push(skb, ETH_HLEN);
-	ovs_skb_postpush_rcsum(skb, skb->data, ETH_HLEN);
+	skb_postpush_rcsum(skb, skb->data, ETH_HLEN);
 	ovs_vport_receive(vport, skb, skb_tunnel_info(skb));
 	return;
 error:
--- a/net/openvswitch/vport.h
+++ b/net/openvswitch/vport.h
@@ -185,13 +185,6 @@ static inline struct vport *vport_from_p
 int ovs_vport_receive(struct vport *, struct sk_buff *,
 		      const struct ip_tunnel_info *);
 
-static inline void ovs_skb_postpush_rcsum(struct sk_buff *skb,
-				      const void *start, unsigned int len)
-{
-	if (skb->ip_summed == CHECKSUM_COMPLETE)
-		skb->csum = csum_add(skb->csum, csum_partial(start, len, 0));
-}
-
 static inline const char *ovs_vport_name(struct vport *vport)
 {
 	return vport->dev->name;

[toc] | [prev] | [next] | [standalone]


#1401957 — [PATCH 4.5 053/101] ALSA: usb-audio: Yet another Phoneix Audio device quirk

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-17 03:50 +0200
Subject[PATCH 4.5 053/101] ALSA: usb-audio: Yet another Phoneix Audio device quirk
Message-ID<rzCj1-6q8-27@gated-at.bofh.it>
In reply to#1401947
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Takashi Iwai <tiwai@suse.de>

commit 84add303ef950b8d85f54bc2248c2bc73467c329 upstream.

Phoenix Audio has yet another device with another id (even a different
vendor id, 0556:0014) that requires the same quirk for the sample
rate.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=110221
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/usb/quirks.c |    1 +
 1 file changed, 1 insertion(+)

--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1138,6 +1138,7 @@ bool snd_usb_get_sample_rate_quirk(struc
 	case USB_ID(0x047F, 0x0415): /* Plantronics BT-300 */
 	case USB_ID(0x047F, 0xAA05): /* Plantronics DA45 */
 	case USB_ID(0x04D8, 0xFEEA): /* Benchmark DAC1 Pre */
+	case USB_ID(0x0556, 0x0014): /* Phoenix Audio TMX320VC */
 	case USB_ID(0x074D, 0x3553): /* Outlaw RR2150 (Micronas UAC3553B) */
 	case USB_ID(0x1de7, 0x0013): /* Phoenix Audio MT202exe */
 	case USB_ID(0x1de7, 0x0014): /* Phoenix Audio TMX320 */

[toc] | [prev] | [next] | [standalone]


#1401958 — [PATCH 4.5 057/101] spi: pxa2xx: Do not detect number of enabled chip selects on Intel SPT

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-17 03:50 +0200
Subject[PATCH 4.5 057/101] spi: pxa2xx: Do not detect number of enabled chip selects on Intel SPT
Message-ID<rzCj1-6q8-33@gated-at.bofh.it>
In reply to#1401947
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jarkko Nikula <jarkko.nikula@linux.intel.com>

commit 66ec246eb9982e7eb8e15e1fc55f543230310dd0 upstream.

Certain Intel Sunrisepoint PCH variants report zero chip selects in SPI
capabilities register even they have one per port. Detection in
pxa2xx_spi_probe() sets master->num_chipselect to 0 leading to -EINVAL
from spi_register_master() where chip select count is validated.

Fix this by not using SPI capabilities register on Sunrisepoint. They don't
have more than one chip select so use the default value 1 instead of
detection.

Fixes: 8b136baa5892 ("spi: pxa2xx: Detect number of enabled Intel LPSS SPI chip select signals")
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/spi/spi-pxa2xx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -111,7 +111,7 @@ static const struct lpss_config lpss_pla
 		.reg_general = -1,
 		.reg_ssp = 0x20,
 		.reg_cs_ctrl = 0x24,
-		.reg_capabilities = 0xfc,
+		.reg_capabilities = -1,
 		.rx_threshold = 1,
 		.tx_threshold_lo = 32,
 		.tx_threshold_hi = 56,

[toc] | [prev] | [next] | [standalone]


#1401959 — [PATCH 4.5 048/101] crypto: qat - fix invalid pf2vf_resp_wq logic

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-17 03:50 +0200
Subject[PATCH 4.5 048/101] crypto: qat - fix invalid pf2vf_resp_wq logic
Message-ID<rzCj1-6q8-35@gated-at.bofh.it>
In reply to#1401947
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Tadeusz Struk <tadeusz.struk@intel.com>

commit 9e209fcfb804da262e38e5cd2e680c47a41f0f95 upstream.

The pf2vf_resp_wq is a global so it has to be created at init
and destroyed at exit, instead of per device.

Tested-by: Suresh Marikkannu <sureshx.marikkannu@intel.com>
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/crypto/qat/qat_common/adf_common_drv.h |    2 +
 drivers/crypto/qat/qat_common/adf_ctl_drv.c    |    6 +++++
 drivers/crypto/qat/qat_common/adf_sriov.c      |   26 +++++++++++++++----------
 3 files changed, 24 insertions(+), 10 deletions(-)

--- a/drivers/crypto/qat/qat_common/adf_common_drv.h
+++ b/drivers/crypto/qat/qat_common/adf_common_drv.h
@@ -144,6 +144,8 @@ void adf_disable_aer(struct adf_accel_de
 void adf_dev_restore(struct adf_accel_dev *accel_dev);
 int adf_init_aer(void);
 void adf_exit_aer(void);
+int adf_init_pf_wq(void);
+void adf_exit_pf_wq(void);
 int adf_init_admin_comms(struct adf_accel_dev *accel_dev);
 void adf_exit_admin_comms(struct adf_accel_dev *accel_dev);
 int adf_send_admin_init(struct adf_accel_dev *accel_dev);
--- a/drivers/crypto/qat/qat_common/adf_ctl_drv.c
+++ b/drivers/crypto/qat/qat_common/adf_ctl_drv.c
@@ -462,12 +462,17 @@ static int __init adf_register_ctl_devic
 	if (adf_init_aer())
 		goto err_aer;
 
+	if (adf_init_pf_wq())
+		goto err_pf_wq;
+
 	if (qat_crypto_register())
 		goto err_crypto_register;
 
 	return 0;
 
 err_crypto_register:
+	adf_exit_pf_wq();
+err_pf_wq:
 	adf_exit_aer();
 err_aer:
 	adf_chr_drv_destroy();
@@ -480,6 +485,7 @@ static void __exit adf_unregister_ctl_de
 {
 	adf_chr_drv_destroy();
 	adf_exit_aer();
+	adf_exit_pf_wq();
 	qat_crypto_unregister();
 	adf_clean_vf_map(false);
 	mutex_destroy(&adf_ctl_lock);
--- a/drivers/crypto/qat/qat_common/adf_sriov.c
+++ b/drivers/crypto/qat/qat_common/adf_sriov.c
@@ -119,11 +119,6 @@ static int adf_enable_sriov(struct adf_a
 	int i;
 	u32 reg;
 
-	/* Workqueue for PF2VF responses */
-	pf2vf_resp_wq = create_workqueue("qat_pf2vf_resp_wq");
-	if (!pf2vf_resp_wq)
-		return -ENOMEM;
-
 	for (i = 0, vf_info = accel_dev->pf.vf_info; i < totalvfs;
 	     i++, vf_info++) {
 		/* This ptr will be populated when VFs will be created */
@@ -216,11 +211,6 @@ void adf_disable_sriov(struct adf_accel_
 
 	kfree(accel_dev->pf.vf_info);
 	accel_dev->pf.vf_info = NULL;
-
-	if (pf2vf_resp_wq) {
-		destroy_workqueue(pf2vf_resp_wq);
-		pf2vf_resp_wq = NULL;
-	}
 }
 EXPORT_SYMBOL_GPL(adf_disable_sriov);
 
@@ -304,3 +294,19 @@ int adf_sriov_configure(struct pci_dev *
 	return numvfs;
 }
 EXPORT_SYMBOL_GPL(adf_sriov_configure);
+
+int __init adf_init_pf_wq(void)
+{
+	/* Workqueue for PF2VF responses */
+	pf2vf_resp_wq = create_workqueue("qat_pf2vf_resp_wq");
+
+	return !pf2vf_resp_wq ? -ENOMEM : 0;
+}
+
+void adf_exit_pf_wq(void)
+{
+	if (pf2vf_resp_wq) {
+		destroy_workqueue(pf2vf_resp_wq);
+		pf2vf_resp_wq = NULL;
+	}
+}

[toc] | [prev] | [next] | [standalone]


#1401960 — [PATCH 4.5 055/101] ALSA: hda - Fix white noise on Asus UX501VW headset

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-17 03:50 +0200
Subject[PATCH 4.5 055/101] ALSA: hda - Fix white noise on Asus UX501VW headset
Message-ID<rzCj1-6q8-31@gated-at.bofh.it>
In reply to#1401947
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Kaho Ng <ngkaho1234@gmail.com>

commit 2da2dc9ead232f25601404335cca13c0f722d41b upstream.

For reducing the noise from the headset output on ASUS UX501VW,
call the existing fixup, alc_fixup_headset_mode_alc668(), additionally.

Thread: https://bbs.archlinux.org/viewtopic.php?id=209554

Signed-off-by: Kaho Ng <ngkaho1234@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/patch_realtek.c |    1 +
 1 file changed, 1 insertion(+)

--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6704,6 +6704,7 @@ static const struct snd_pci_quirk alc662
 	SND_PCI_QUIRK(0x1028, 0x0698, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
+	SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE),
 	SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_ASUS_Nx50),
 	SND_PCI_QUIRK(0x1043, 0x13df, "Asus N550JX", ALC662_FIXUP_BASS_1A),
 	SND_PCI_QUIRK(0x1043, 0x129d, "Asus N750", ALC662_FIXUP_ASUS_Nx50),

[toc] | [prev] | [next] | [standalone]


#1401962 — [PATCH 4.5 045/101] ocfs2: fix posix_acl_create deadlock

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-17 03:50 +0200
Subject[PATCH 4.5 045/101] ocfs2: fix posix_acl_create deadlock
Message-ID<rzCj1-6q8-39@gated-at.bofh.it>
In reply to#1401947
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Junxiao Bi <junxiao.bi@oracle.com>

commit c25a1e0671fbca7b2c0d0757d533bd2650d6dc0c upstream.

Commit 702e5bc68ad2 ("ocfs2: use generic posix ACL infrastructure")
refactored code to use posix_acl_create.  The problem with this function
is that it is not mindful of the cluster wide inode lock making it
unsuitable for use with ocfs2 inode creation with ACLs.  For example,
when used in ocfs2_mknod, this function can cause deadlock as follows.
The parent dir inode lock is taken when calling posix_acl_create ->
get_acl -> ocfs2_iop_get_acl which takes the inode lock again.  This can
cause deadlock if there is a blocked remote lock request waiting for the
lock to be downconverted.  And same deadlock happened in ocfs2_reflink.
This fix is to revert back using ocfs2_init_acl.

Fixes: 702e5bc68ad2 ("ocfs2: use generic posix ACL infrastructure")
Signed-off-by: Tariq Saeed <tariq.x.saeed@oracle.com>
Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Joseph Qi <joseph.qi@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/ocfs2/acl.c          |   63 ++++++++++++++++++++++++++++++++++++++++++++++++
 fs/ocfs2/acl.h          |    4 +++
 fs/ocfs2/namei.c        |   23 +----------------
 fs/ocfs2/refcounttree.c |   17 +-----------
 fs/ocfs2/xattr.c        |   14 +++-------
 fs/ocfs2/xattr.h        |    4 ---
 6 files changed, 77 insertions(+), 48 deletions(-)

--- a/fs/ocfs2/acl.c
+++ b/fs/ocfs2/acl.c
@@ -346,3 +346,66 @@ int ocfs2_acl_chmod(struct inode *inode,
 	posix_acl_release(acl);
 	return ret;
 }
+
+/*
+ * Initialize the ACLs of a new inode. If parent directory has default ACL,
+ * then clone to new inode. Called from ocfs2_mknod.
+ */
+int ocfs2_init_acl(handle_t *handle,
+		   struct inode *inode,
+		   struct inode *dir,
+		   struct buffer_head *di_bh,
+		   struct buffer_head *dir_bh,
+		   struct ocfs2_alloc_context *meta_ac,
+		   struct ocfs2_alloc_context *data_ac)
+{
+	struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+	struct posix_acl *acl = NULL;
+	int ret = 0, ret2;
+	umode_t mode;
+
+	if (!S_ISLNK(inode->i_mode)) {
+		if (osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) {
+			acl = ocfs2_get_acl_nolock(dir, ACL_TYPE_DEFAULT,
+						   dir_bh);
+			if (IS_ERR(acl))
+				return PTR_ERR(acl);
+		}
+		if (!acl) {
+			mode = inode->i_mode & ~current_umask();
+			ret = ocfs2_acl_set_mode(inode, di_bh, handle, mode);
+			if (ret) {
+				mlog_errno(ret);
+				goto cleanup;
+			}
+		}
+	}
+	if ((osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) && acl) {
+		if (S_ISDIR(inode->i_mode)) {
+			ret = ocfs2_set_acl(handle, inode, di_bh,
+					    ACL_TYPE_DEFAULT, acl,
+					    meta_ac, data_ac);
+			if (ret)
+				goto cleanup;
+		}
+		mode = inode->i_mode;
+		ret = __posix_acl_create(&acl, GFP_NOFS, &mode);
+		if (ret < 0)
+			return ret;
+
+		ret2 = ocfs2_acl_set_mode(inode, di_bh, handle, mode);
+		if (ret2) {
+			mlog_errno(ret2);
+			ret = ret2;
+			goto cleanup;
+		}
+		if (ret > 0) {
+			ret = ocfs2_set_acl(handle, inode,
+					    di_bh, ACL_TYPE_ACCESS,
+					    acl, meta_ac, data_ac);
+		}
+	}
+cleanup:
+	posix_acl_release(acl);
+	return ret;
+}
--- a/fs/ocfs2/acl.h
+++ b/fs/ocfs2/acl.h
@@ -36,5 +36,9 @@ int ocfs2_set_acl(handle_t *handle,
 			 struct ocfs2_alloc_context *meta_ac,
 			 struct ocfs2_alloc_context *data_ac);
 extern int ocfs2_acl_chmod(struct inode *, struct buffer_head *);
+extern int ocfs2_init_acl(handle_t *, struct inode *, struct inode *,
+			  struct buffer_head *, struct buffer_head *,
+			  struct ocfs2_alloc_context *,
+			  struct ocfs2_alloc_context *);
 
 #endif /* OCFS2_ACL_H */
--- a/fs/ocfs2/namei.c
+++ b/fs/ocfs2/namei.c
@@ -259,7 +259,6 @@ static int ocfs2_mknod(struct inode *dir
 	struct ocfs2_dir_lookup_result lookup = { NULL, };
 	sigset_t oldset;
 	int did_block_signals = 0;
-	struct posix_acl *default_acl = NULL, *acl = NULL;
 	struct ocfs2_dentry_lock *dl = NULL;
 
 	trace_ocfs2_mknod(dir, dentry, dentry->d_name.len, dentry->d_name.name,
@@ -367,12 +366,6 @@ static int ocfs2_mknod(struct inode *dir
 		goto leave;
 	}
 
-	status = posix_acl_create(dir, &inode->i_mode, &default_acl, &acl);
-	if (status) {
-		mlog_errno(status);
-		goto leave;
-	}
-
 	handle = ocfs2_start_trans(osb, ocfs2_mknod_credits(osb->sb,
 							    S_ISDIR(mode),
 							    xattr_credits));
@@ -421,16 +414,8 @@ static int ocfs2_mknod(struct inode *dir
 		inc_nlink(dir);
 	}
 
-	if (default_acl) {
-		status = ocfs2_set_acl(handle, inode, new_fe_bh,
-				       ACL_TYPE_DEFAULT, default_acl,
-				       meta_ac, data_ac);
-	}
-	if (!status && acl) {
-		status = ocfs2_set_acl(handle, inode, new_fe_bh,
-				       ACL_TYPE_ACCESS, acl,
-				       meta_ac, data_ac);
-	}
+	status = ocfs2_init_acl(handle, inode, dir, new_fe_bh, parent_fe_bh,
+			 meta_ac, data_ac);
 
 	if (status < 0) {
 		mlog_errno(status);
@@ -472,10 +457,6 @@ static int ocfs2_mknod(struct inode *dir
 	d_instantiate(dentry, inode);
 	status = 0;
 leave:
-	if (default_acl)
-		posix_acl_release(default_acl);
-	if (acl)
-		posix_acl_release(acl);
 	if (status < 0 && did_quota_inode)
 		dquot_free_inode(inode);
 	if (handle)
--- a/fs/ocfs2/refcounttree.c
+++ b/fs/ocfs2/refcounttree.c
@@ -4248,20 +4248,12 @@ static int ocfs2_reflink(struct dentry *
 	struct inode *inode = d_inode(old_dentry);
 	struct buffer_head *old_bh = NULL;
 	struct inode *new_orphan_inode = NULL;
-	struct posix_acl *default_acl, *acl;
-	umode_t mode;
 
 	if (!ocfs2_refcount_tree(OCFS2_SB(inode->i_sb)))
 		return -EOPNOTSUPP;
 
-	mode = inode->i_mode;
-	error = posix_acl_create(dir, &mode, &default_acl, &acl);
-	if (error) {
-		mlog_errno(error);
-		return error;
-	}
 
-	error = ocfs2_create_inode_in_orphan(dir, mode,
+	error = ocfs2_create_inode_in_orphan(dir, inode->i_mode,
 					     &new_orphan_inode);
 	if (error) {
 		mlog_errno(error);
@@ -4300,16 +4292,11 @@ static int ocfs2_reflink(struct dentry *
 	/* If the security isn't preserved, we need to re-initialize them. */
 	if (!preserve) {
 		error = ocfs2_init_security_and_acl(dir, new_orphan_inode,
-						    &new_dentry->d_name,
-						    default_acl, acl);
+						    &new_dentry->d_name);
 		if (error)
 			mlog_errno(error);
 	}
 out:
-	if (default_acl)
-		posix_acl_release(default_acl);
-	if (acl)
-		posix_acl_release(acl);
 	if (!error) {
 		error = ocfs2_mv_orphaned_inode_to_new(dir, new_orphan_inode,
 						       new_dentry);
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -7216,12 +7216,10 @@ out:
  */
 int ocfs2_init_security_and_acl(struct inode *dir,
 				struct inode *inode,
-				const struct qstr *qstr,
-				struct posix_acl *default_acl,
-				struct posix_acl *acl)
+				const struct qstr *qstr)
 {
-	struct buffer_head *dir_bh = NULL;
 	int ret = 0;
+	struct buffer_head *dir_bh = NULL;
 
 	ret = ocfs2_init_security_get(inode, dir, qstr, NULL);
 	if (ret) {
@@ -7234,11 +7232,9 @@ int ocfs2_init_security_and_acl(struct i
 		mlog_errno(ret);
 		goto leave;
 	}
-
-	if (!ret && default_acl)
-		ret = ocfs2_iop_set_acl(inode, default_acl, ACL_TYPE_DEFAULT);
-	if (!ret && acl)
-		ret = ocfs2_iop_set_acl(inode, acl, ACL_TYPE_ACCESS);
+	ret = ocfs2_init_acl(NULL, inode, dir, NULL, dir_bh, NULL, NULL);
+	if (ret)
+		mlog_errno(ret);
 
 	ocfs2_inode_unlock(dir, 0);
 	brelse(dir_bh);
--- a/fs/ocfs2/xattr.h
+++ b/fs/ocfs2/xattr.h
@@ -94,7 +94,5 @@ int ocfs2_reflink_xattrs(struct inode *o
 			 bool preserve_security);
 int ocfs2_init_security_and_acl(struct inode *dir,
 				struct inode *inode,
-				const struct qstr *qstr,
-				struct posix_acl *default_acl,
-				struct posix_acl *acl);
+				const struct qstr *qstr);
 #endif /* OCFS2_XATTR_H */

[toc] | [prev] | [next] | [standalone]


#1401963 — [PATCH 4.5 064/101] vfs: add vfs_select_inode() helper

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-17 03:50 +0200
Subject[PATCH 4.5 064/101] vfs: add vfs_select_inode() helper
Message-ID<rzCj1-6q8-41@gated-at.bofh.it>
In reply to#1401947
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Miklos Szeredi <mszeredi@redhat.com>

commit 54d5ca871e72f2bb172ec9323497f01cd5091ec7 upstream.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/open.c              |   12 ++++--------
 include/linux/dcache.h |   12 ++++++++++++
 2 files changed, 16 insertions(+), 8 deletions(-)

--- a/fs/open.c
+++ b/fs/open.c
@@ -840,16 +840,12 @@ EXPORT_SYMBOL(file_path);
 int vfs_open(const struct path *path, struct file *file,
 	     const struct cred *cred)
 {
-	struct dentry *dentry = path->dentry;
-	struct inode *inode = dentry->d_inode;
+	struct inode *inode = vfs_select_inode(path->dentry, file->f_flags);
 
-	file->f_path = *path;
-	if (dentry->d_flags & DCACHE_OP_SELECT_INODE) {
-		inode = dentry->d_op->d_select_inode(dentry, file->f_flags);
-		if (IS_ERR(inode))
-			return PTR_ERR(inode);
-	}
+	if (IS_ERR(inode))
+		return PTR_ERR(inode);
 
+	file->f_path = *path;
 	return do_dentry_open(file, inode, NULL, cred);
 }
 
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -592,4 +592,16 @@ static inline struct dentry *d_real(stru
 		return dentry;
 }
 
+static inline struct inode *vfs_select_inode(struct dentry *dentry,
+					     unsigned open_flags)
+{
+	struct inode *inode = d_inode(dentry);
+
+	if (inode && unlikely(dentry->d_flags & DCACHE_OP_SELECT_INODE))
+		inode = dentry->d_op->d_select_inode(dentry, open_flags);
+
+	return inode;
+}
+
+
 #endif	/* __LINUX_DCACHE_H */

[toc] | [prev] | [next] | [standalone]


#1401965 — [PATCH 4.5 062/101] perf diff: Fix duplicated output column

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-17 03:50 +0200
Subject[PATCH 4.5 062/101] perf diff: Fix duplicated output column
Message-ID<rzCj1-6q8-47@gated-at.bofh.it>
In reply to#1401947
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Namhyung Kim <namhyung@kernel.org>

commit e9d848cb65d5f6f7731d12bd1b6d994bfdbcc94f upstream.

The commit b97511c5bc94 ("perf tools: Add overhead/overhead_children
keys defaults via string") moved initialization of column headers but it
missed to check the sort__mode.  As 'perf diff' doesn't call
perf_hpp__init(), the setup_overhead() also should not be called.

Before:

  # Baseline    Delta  Children  Overhead  Shared Object        Symbol
  # ........  .......  ........  ........  ...................  .......................
  #
      28.48%  -28.47%    28.48%    28.48%  [kernel.vmlinux ]    [k] intel_idle
      11.51%  -11.47%    11.51%    11.51%  libxul.so            [.] 0x0000000001a360f7
       3.49%   -3.49%     3.49%     3.49%  [kernel.vmlinux]     [k] generic_exec_single
       2.91%   -2.89%     2.91%     2.91%  libdbus-1.so.3.8.11  [.] 0x000000000000cdc2
       2.86%   -2.85%     2.86%     2.86%  libxcb.so.1.1.0      [.] 0x000000000000c890
       2.44%   -2.39%     2.44%     2.44%  [kernel.vmlinux]     [k] perf_event_aux_ctx

After:

  # Baseline    Delta  Shared Object        Symbol
  # ........  .......  ...................  .......................
  #
      28.48%  -28.47%  [kernel.vmlinux]     [k] intel_idle
      11.51%  -11.47%  libxul.so            [.] 0x0000000001a360f7
       3.49%   -3.49%  [kernel.vmlinux]     [k] generic_exec_single
       2.91%   -2.89%  libdbus-1.so.3.8.11  [.] 0x000000000000cdc2
       2.86%   -2.85%  libxcb.so.1.1.0      [.] 0x000000000000c890
       2.44%   -2.39%  [kernel.vmlinux]     [k] perf_event_aux_ctx

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: b97511c5bc94 ("perf tools: Add overhead/overhead_children keys defaults via string")
Link: http://lkml.kernel.org/r/1462890384-12486-2-git-send-email-acme@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 tools/perf/util/sort.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -2272,6 +2272,9 @@ static char *prefix_if_not_in(const char
 
 static char *setup_overhead(char *keys)
 {
+	if (sort__mode == SORT_MODE__DIFF)
+		return keys;
+
 	keys = prefix_if_not_in("overhead", keys);
 
 	if (symbol_conf.cumulate_callchain)

[toc] | [prev] | [next] | [standalone]


#1401966 — [PATCH 4.5 046/101] zsmalloc: fix zs_can_compact() integer overflow

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-17 03:50 +0200
Subject[PATCH 4.5 046/101] zsmalloc: fix zs_can_compact() integer overflow
Message-ID<rzCj1-6q8-49@gated-at.bofh.it>
In reply to#1401947
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>

commit 44f43e99fe70833058482d183e99fdfd11220996 upstream.

zs_can_compact() has two race conditions in its core calculation:

unsigned long obj_wasted = zs_stat_get(class, OBJ_ALLOCATED) -
				zs_stat_get(class, OBJ_USED);

1) classes are not locked, so the numbers of allocated and used
   objects can change by the concurrent ops happening on other CPUs
2) shrinker invokes it from preemptible context

Depending on the circumstances, thus, OBJ_ALLOCATED can become
less than OBJ_USED, which can result in either very high or
negative `total_scan' value calculated later in do_shrink_slab().

do_shrink_slab() has some logic to prevent those cases:

 vmscan: shrink_slab: zs_shrinker_scan+0x0/0x28 [zsmalloc] negative objects to delete nr=-62
 vmscan: shrink_slab: zs_shrinker_scan+0x0/0x28 [zsmalloc] negative objects to delete nr=-62
 vmscan: shrink_slab: zs_shrinker_scan+0x0/0x28 [zsmalloc] negative objects to delete nr=-64
 vmscan: shrink_slab: zs_shrinker_scan+0x0/0x28 [zsmalloc] negative objects to delete nr=-62
 vmscan: shrink_slab: zs_shrinker_scan+0x0/0x28 [zsmalloc] negative objects to delete nr=-62
 vmscan: shrink_slab: zs_shrinker_scan+0x0/0x28 [zsmalloc] negative objects to delete nr=-62

However, due to the way `total_scan' is calculated, not every
shrinker->count_objects() overflow can be spotted and handled.
To demonstrate the latter, I added some debugging code to do_shrink_slab()
(x86_64) and the results were:

 vmscan: OVERFLOW: shrinker->count_objects() == -1 [18446744073709551615]
 vmscan: but total_scan > 0: 92679974445502
 vmscan: resulting total_scan: 92679974445502
[..]
 vmscan: OVERFLOW: shrinker->count_objects() == -1 [18446744073709551615]
 vmscan: but total_scan > 0: 22634041808232578
 vmscan: resulting total_scan: 22634041808232578

Even though shrinker->count_objects() has returned an overflowed value,
the resulting `total_scan' is positive, and, what is more worrisome, it
is insanely huge. This value is getting used later on in
shrinker->scan_objects() loop:

        while (total_scan >= batch_size ||
               total_scan >= freeable) {
                unsigned long ret;
                unsigned long nr_to_scan = min(batch_size, total_scan);

                shrinkctl->nr_to_scan = nr_to_scan;
                ret = shrinker->scan_objects(shrinker, shrinkctl);
                if (ret == SHRINK_STOP)
                        break;
                freed += ret;

                count_vm_events(SLABS_SCANNED, nr_to_scan);
                total_scan -= nr_to_scan;

                cond_resched();
        }

`total_scan >= batch_size' is true for a very-very long time and
'total_scan >= freeable' is also true for quite some time, because
`freeable < 0' and `total_scan' is large enough, for example,
22634041808232578. The only break condition, in the given scheme of
things, is shrinker->scan_objects() == SHRINK_STOP test, which is a
bit too weak to rely on, especially in heavy zsmalloc-usage scenarios.

To fix the issue, take a pool stat snapshot and use it instead of
racy zs_stat_get() calls.

Link: http://lkml.kernel.org/r/20160509140052.3389-1-sergey.senozhatsky@gmail.com
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/zsmalloc.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1732,10 +1732,13 @@ static struct page *isolate_source_page(
 static unsigned long zs_can_compact(struct size_class *class)
 {
 	unsigned long obj_wasted;
+	unsigned long obj_allocated = zs_stat_get(class, OBJ_ALLOCATED);
+	unsigned long obj_used = zs_stat_get(class, OBJ_USED);
 
-	obj_wasted = zs_stat_get(class, OBJ_ALLOCATED) -
-		zs_stat_get(class, OBJ_USED);
+	if (obj_allocated <= obj_used)
+		return 0;
 
+	obj_wasted = obj_allocated - obj_used;
 	obj_wasted /= get_maxobj_per_zspage(class->size,
 			class->pages_per_zspage);
 

[toc] | [prev] | [next] | [standalone]


#1401967 — [PATCH 4.5 052/101] ALSA: usb-audio: Quirk for yet another Phoenix Audio devices (v2)

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-17 03:50 +0200
Subject[PATCH 4.5 052/101] ALSA: usb-audio: Quirk for yet another Phoenix Audio devices (v2)
Message-ID<rzCj2-6q8-53@gated-at.bofh.it>
In reply to#1401947
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Takashi Iwai <tiwai@suse.de>

commit 2d2c038a9999f423e820d89db2b5d7774b67ba49 upstream.

Phoenix Audio MT202pcs (1de7:0114) and MT202exe (1de7:0013) need the
same workaround as TMX320 for avoiding the firmware bug.  It fixes the
frequent error about the sample rate inquiries and the slow device
probe as consequence.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=117321
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/usb/quirks.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1139,7 +1139,9 @@ bool snd_usb_get_sample_rate_quirk(struc
 	case USB_ID(0x047F, 0xAA05): /* Plantronics DA45 */
 	case USB_ID(0x04D8, 0xFEEA): /* Benchmark DAC1 Pre */
 	case USB_ID(0x074D, 0x3553): /* Outlaw RR2150 (Micronas UAC3553B) */
+	case USB_ID(0x1de7, 0x0013): /* Phoenix Audio MT202exe */
 	case USB_ID(0x1de7, 0x0014): /* Phoenix Audio TMX320 */
+	case USB_ID(0x1de7, 0x0114): /* Phoenix Audio MT202pcs */
 	case USB_ID(0x21B4, 0x0081): /* AudioQuest DragonFly */
 		return true;
 	}

[toc] | [prev] | [next] | [standalone]


#1401968 — [PATCH 4.5 023/101] samples/bpf: fix trace_output example

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-17 03:50 +0200
Subject[PATCH 4.5 023/101] samples/bpf: fix trace_output example
Message-ID<rzCj2-6q8-55@gated-at.bofh.it>
In reply to#1401947
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Alexei Starovoitov <ast@fb.com>

[ Upstream commit 569cc39d39385a74b23145496bca2df5ac8b2fb8 ]

llvm cannot always recognize memset as builtin function and optimize
it away, so just delete it. It was a leftover from testing
of bpf_perf_event_output() with large data structures.

Fixes: 39111695b1b8 ("samples: bpf: add bpf_perf_event_output example")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 samples/bpf/trace_output_kern.c |    1 -
 1 file changed, 1 deletion(-)

--- a/samples/bpf/trace_output_kern.c
+++ b/samples/bpf/trace_output_kern.c
@@ -18,7 +18,6 @@ int bpf_prog1(struct pt_regs *ctx)
 		u64 cookie;
 	} data;
 
-	memset(&data, 0, sizeof(data));
 	data.pid = bpf_get_current_pid_tgid();
 	data.cookie = 0x12345678;
 

[toc] | [prev] | [next] | [standalone]


#1401969 — [PATCH 4.5 041/101] net: thunderx: avoid exposing kernel stack

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-17 03:50 +0200
Subject[PATCH 4.5 041/101] net: thunderx: avoid exposing kernel stack
Message-ID<rzCj2-6q8-65@gated-at.bofh.it>
In reply to#1401947
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: "xypron.glpk@gmx.de" <xypron.glpk@gmx.de>

[ Upstream commit 161de2caf68c549c266e571ffba8e2163886fb10 ]

Reserved fields should be set to zero to avoid exposing
bits from the kernel stack.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/cavium/thunder/nicvf_queues.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
@@ -519,6 +519,7 @@ static void nicvf_rcv_queue_config(struc
 		nicvf_config_vlan_stripping(nic, nic->netdev->features);
 
 	/* Enable Receive queue */
+	memset(&rq_cfg, 0, sizeof(struct rq_cfg));
 	rq_cfg.ena = 1;
 	rq_cfg.tcp_ena = 0;
 	nicvf_queue_reg_write(nic, NIC_QSET_RQ_0_7_CFG, qidx, *(u64 *)&rq_cfg);
@@ -551,6 +552,7 @@ void nicvf_cmp_queue_config(struct nicvf
 			      qidx, (u64)(cq->dmem.phys_base));
 
 	/* Enable Completion queue */
+	memset(&cq_cfg, 0, sizeof(struct cq_cfg));
 	cq_cfg.ena = 1;
 	cq_cfg.reset = 0;
 	cq_cfg.caching = 0;
@@ -599,6 +601,7 @@ static void nicvf_snd_queue_config(struc
 			      qidx, (u64)(sq->dmem.phys_base));
 
 	/* Enable send queue  & set queue size */
+	memset(&sq_cfg, 0, sizeof(struct sq_cfg));
 	sq_cfg.ena = 1;
 	sq_cfg.reset = 0;
 	sq_cfg.ldwb = 0;
@@ -635,6 +638,7 @@ static void nicvf_rbdr_config(struct nic
 
 	/* Enable RBDR  & set queue size */
 	/* Buffer size should be in multiples of 128 bytes */
+	memset(&rbdr_cfg, 0, sizeof(struct rbdr_cfg));
 	rbdr_cfg.ena = 1;
 	rbdr_cfg.reset = 0;
 	rbdr_cfg.ldwb = 0;

[toc] | [prev] | [next] | [standalone]


#1401970 — [PATCH 4.5 016/101] net/mlx5e: Fix minimum MTU

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-17 03:50 +0200
Subject[PATCH 4.5 016/101] net/mlx5e: Fix minimum MTU
Message-ID<rzCj2-6q8-51@gated-at.bofh.it>
In reply to#1401947
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Saeed Mahameed <saeedm@mellanox.com>

[ Upstream commit d8edd2469ace550db707798180d1c84d81f93bca ]

Minimum MTU that can be set in Connectx4 device is 68.

This fixes the case where a user wants to set invalid MTU,
the driver will fail to satisfy this request and the interface
will stay down.

It is better to report an error and continue working with old
mtu.

Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -1906,22 +1906,27 @@ static int mlx5e_set_features(struct net
 	return err;
 }
 
+#define MXL5_HW_MIN_MTU 64
+#define MXL5E_MIN_MTU (MXL5_HW_MIN_MTU + ETH_FCS_LEN)
+
 static int mlx5e_change_mtu(struct net_device *netdev, int new_mtu)
 {
 	struct mlx5e_priv *priv = netdev_priv(netdev);
 	struct mlx5_core_dev *mdev = priv->mdev;
 	bool was_opened;
 	u16 max_mtu;
+	u16 min_mtu;
 	int err = 0;
 
 	mlx5_query_port_max_mtu(mdev, &max_mtu, 1);
 
 	max_mtu = MLX5E_HW2SW_MTU(max_mtu);
+	min_mtu = MLX5E_HW2SW_MTU(MXL5E_MIN_MTU);
 
-	if (new_mtu > max_mtu) {
+	if (new_mtu > max_mtu || new_mtu < min_mtu) {
 		netdev_err(netdev,
-			   "%s: Bad MTU (%d) > (%d) Max\n",
-			   __func__, new_mtu, max_mtu);
+			   "%s: Bad MTU (%d), valid range is: [%d..%d]\n",
+			   __func__, new_mtu, min_mtu, max_mtu);
 		return -EINVAL;
 	}
 

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | linux.kernel


csiph-web