linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4.4 00/27] 4.4.43-stable review
@ 2017-01-13 11:38 ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 01/27] netvsc: reduce maximum GSO size Greg Kroah-Hartman
                     ` (27 more replies)
  0 siblings, 28 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuah.kh, patches,
	ben.hutchings, stable

This is the start of the stable review cycle for the 4.4.43 release.
There are 27 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 Sun Jan 15 11:36:57 UTC 2017.
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.4.43-rc1.gz
or in the git tree and branch at:
  git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
and the diffstat can be found below.

thanks,

greg k-h

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

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

Oliver O'Halloran <oohall@gmail.com>
    mm/init: fix zone boundary creation

Dennis Kadioglu <denk@post.com>
    ALSA: usb-audio: Add a quirk for Plantronics BT600

Uwe Kleine-König <uwe@kleine-koenig.org>
    spi: mvebu: fix baudrate calculation for armada variant

Tony Lindgren <tony@atomide.com>
    ARM: OMAP4+: Fix bad fallthrough for cpuidle

Kyle Roeschley <kyle.roeschley@ni.com>
    ARM: zynq: Reserve correct amount of non-DMA RAM

Larry Finger <Larry.Finger@lwfinger.net>
    powerpc: Fix build warning on 32-bit PPC

Takashi Sakamoto <o-takashi@sakamocchi.jp>
    ALSA: firewire-tascam: Fix to handle error from initialization of stream data

Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    HID: hid-cypress: validate length of report

David Ahern <dsa@cumulusnetworks.com>
    net: vrf: do not allow table id 0

David Ahern <dsa@cumulusnetworks.com>
    net: ipv4: Fix multipath selection with vrf

Herbert Xu <herbert@gondor.apana.org.au>
    gro: Disable frag0 optimization on IPv6 ext headers

Eric Dumazet <edumazet@google.com>
    gro: use min_t() in skb_gro_reset_offset()

Herbert Xu <herbert@gondor.apana.org.au>
    gro: Enter slow-path if there is no tailroom

hayeswang <hayeswang@realtek.com>
    r8152: fix rx issue for runtime suspend

hayeswang <hayeswang@realtek.com>
    r8152: split rtl8152_suspend function

Alexander Duyck <alexander.h.duyck@intel.com>
    ipv4: Do not allow MAIN to be alias for new LOCAL w/ custom rules

Michal Tesar <mtesar@redhat.com>
    igmp: Make igmp group member RFC 3376 compliant

Reiter Wolfgang <wr0112358@gmail.com>
    drop_monitor: consider inserted data in genlmsg_end

Reiter Wolfgang <wr0112358@gmail.com>
    drop_monitor: add missing call to genlmsg_end

Eli Cohen <eli@mellanox.com>
    net/mlx5: Avoid shadowing numa_node

Noa Osherovich <noaos@mellanox.com>
    net/mlx5: Check FW limitations on log_max_qp before setting it

Florian Fainelli <f.fainelli@gmail.com>
    net: stmmac: Fix race between stmmac_drv_probe and stmmac_open

Daniel Borkmann <daniel@iogearbox.net>
    net, sched: fix soft lockup in tc_classify

Dave Jones <davej@codemonkey.org.uk>
    ipv6: handle -EFAULT from skb_copy_bits

David Ahern <dsa@cumulusnetworks.com>
    net: vrf: Drop conntrack data after pass through VRF device on Tx

Dan Carpenter <dan.carpenter@oracle.com>
    ser_gigaset: return -ENOMEM on error instead of success

stephen hemminger <stephen@networkplumber.org>
    netvsc: reduce maximum GSO size


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

Diffstat:

 Makefile                                          |  4 +-
 arch/arm/mach-omap2/omap-mpuss-lowpower.c         |  5 +-
 arch/arm/mach-zynq/common.c                       |  2 +-
 arch/powerpc/kernel/misc_32.S                     |  2 +-
 drivers/hid/hid-cypress.c                         |  3 +
 drivers/isdn/gigaset/ser-gigaset.c                |  4 +-
 drivers/net/ethernet/mellanox/mlx5/core/main.c    | 10 ++-
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 22 +++---
 drivers/net/hyperv/netvsc_drv.c                   |  3 +
 drivers/net/usb/r8152.c                           | 80 +++++++++++++++++-----
 drivers/net/vrf.c                                 |  8 +++
 drivers/spi/spi-orion.c                           | 83 +++++++++++++++--------
 include/linux/netdevice.h                         |  9 ++-
 mm/page_alloc.c                                   | 17 +++--
 net/core/dev.c                                    |  4 +-
 net/core/drop_monitor.c                           | 39 ++++++++---
 net/ipv4/fib_frontend.c                           |  2 +-
 net/ipv4/fib_semantics.c                          |  9 ++-
 net/ipv4/igmp.c                                   |  7 +-
 net/ipv6/ip6_offload.c                            |  1 +
 net/ipv6/raw.c                                    |  6 +-
 net/sched/cls_api.c                               |  4 +-
 sound/firewire/tascam/tascam-stream.c             |  2 +-
 sound/usb/quirks.c                                |  1 +
 24 files changed, 237 insertions(+), 90 deletions(-)

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 01/27] netvsc: reduce maximum GSO size
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-02-09 19:37     ` Ben Hutchings
  2017-01-13 11:38   ` [PATCH 4.4 02/27] ser_gigaset: return -ENOMEM on error instead of success Greg Kroah-Hartman
                     ` (26 subsequent siblings)
  27 siblings, 1 reply; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Stephen Hemminger, David S. Miller

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: stephen hemminger <stephen@networkplumber.org>


[ Upstream commit a50af86dd49ee1851d1ccf06dd0019c05b95e297 ]

Hyper-V (and Azure) support using NVGRE which requires some extra space
for encapsulation headers. Because of this the largest allowed TSO
packet is reduced.

For older releases, hard code a fixed reduced value.  For next release,
there is a better solution which uses result of host offload
negotiation.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/hyperv/netvsc_drv.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -40,6 +40,8 @@
 
 #include "hyperv_net.h"
 
+/* Restrict GSO size to account for NVGRE */
+#define NETVSC_GSO_MAX_SIZE	62768
 
 #define RING_SIZE_MIN 64
 static int ring_size = 128;
@@ -852,6 +854,7 @@ static int netvsc_set_channels(struct ne
 		}
 		goto recover;
 	}
+	netif_set_gso_max_size(net, NETVSC_GSO_MAX_SIZE);
 
  out:
 	netvsc_open(net);

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 02/27] ser_gigaset: return -ENOMEM on error instead of success
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 01/27] netvsc: reduce maximum GSO size Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 03/27] net: vrf: Drop conntrack data after pass through VRF device on Tx Greg Kroah-Hartman
                     ` (25 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Dan Carpenter, David S. Miller

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Dan Carpenter <dan.carpenter@oracle.com>


[ Upstream commit 93a97c50cbf1c007caf12db5cc23e0d5b9c8473c ]

If we can't allocate the resources in gigaset_initdriver() then we
should return -ENOMEM instead of zero.

Fixes: 2869b23e4b95 ("[PATCH] drivers/isdn/gigaset: new M101 driver (v2)")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/isdn/gigaset/ser-gigaset.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/isdn/gigaset/ser-gigaset.c
+++ b/drivers/isdn/gigaset/ser-gigaset.c
@@ -762,8 +762,10 @@ static int __init ser_gigaset_init(void)
 	driver = gigaset_initdriver(GIGASET_MINOR, GIGASET_MINORS,
 				    GIGASET_MODULENAME, GIGASET_DEVNAME,
 				    &ops, THIS_MODULE);
-	if (!driver)
+	if (!driver) {
+		rc = -ENOMEM;
 		goto error;
+	}
 
 	rc = tty_register_ldisc(N_GIGASET_M101, &gigaset_ldisc);
 	if (rc != 0) {

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 03/27] net: vrf: Drop conntrack data after pass through VRF device on Tx
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 01/27] netvsc: reduce maximum GSO size Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 02/27] ser_gigaset: return -ENOMEM on error instead of success Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 04/27] ipv6: handle -EFAULT from skb_copy_bits Greg Kroah-Hartman
                     ` (24 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, David Ahern, David S. Miller

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: David Ahern <dsa@cumulusnetworks.com>


[ Upstream commit eb63ecc1706b3e094d0f57438b6c2067cfc299f2 ]

Locally originated traffic in a VRF fails in the presence of a POSTROUTING
rule. For example,

    $ iptables -t nat -A POSTROUTING -s 11.1.1.0/24  -j MASQUERADE
    $ ping -I red -c1 11.1.1.3
    ping: Warning: source address might be selected on device other than red.
    PING 11.1.1.3 (11.1.1.3) from 11.1.1.2 red: 56(84) bytes of data.
    ping: sendmsg: Operation not permitted

Worse, the above causes random corruption resulting in a panic in random
places (I have not seen a consistent backtrace).

Call nf_reset to drop the conntrack info following the pass through the
VRF device.  The nf_reset is needed on Tx but not Rx because of the order
in which NF_HOOK's are hit: on Rx the VRF device is after the real ingress
device and on Tx it is is before the real egress device. Connection
tracking should be tied to the real egress device and not the VRF device.

Fixes: 8f58336d3f78a ("net: Add ethernet header for pass through VRF device")
Fixes: 35402e3136634 ("net: Add IPv6 support to VRF device")
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/vrf.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -410,6 +410,8 @@ static int vrf_finish_output6(struct net
 	struct in6_addr *nexthop;
 	int ret;
 
+	nf_reset(skb);
+
 	skb->protocol = htons(ETH_P_IPV6);
 	skb->dev = dev;
 
@@ -521,6 +523,8 @@ static int vrf_finish_output(struct net
 	u32 nexthop;
 	int ret = -EINVAL;
 
+	nf_reset(skb);
+
 	/* Be paranoid, rather than too clever. */
 	if (unlikely(skb_headroom(skb) < hh_len && dev->header_ops)) {
 		struct sk_buff *skb2;

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 04/27] ipv6: handle -EFAULT from skb_copy_bits
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (2 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 03/27] net: vrf: Drop conntrack data after pass through VRF device on Tx Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 05/27] net, sched: fix soft lockup in tc_classify Greg Kroah-Hartman
                     ` (23 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Dave Jones, David S. Miller

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Dave Jones <davej@codemonkey.org.uk>


[ Upstream commit a98f91758995cb59611e61318dddd8a6956b52c3 ]

By setting certain socket options on ipv6 raw sockets, we can confuse the
length calculation in rawv6_push_pending_frames triggering a BUG_ON.

RIP: 0010:[<ffffffff817c6390>] [<ffffffff817c6390>] rawv6_sendmsg+0xc30/0xc40
RSP: 0018:ffff881f6c4a7c18  EFLAGS: 00010282
RAX: 00000000fffffff2 RBX: ffff881f6c681680 RCX: 0000000000000002
RDX: ffff881f6c4a7cf8 RSI: 0000000000000030 RDI: ffff881fed0f6a00
RBP: ffff881f6c4a7da8 R08: 0000000000000000 R09: 0000000000000009
R10: ffff881fed0f6a00 R11: 0000000000000009 R12: 0000000000000030
R13: ffff881fed0f6a00 R14: ffff881fee39ba00 R15: ffff881fefa93a80

Call Trace:
 [<ffffffff8118ba23>] ? unmap_page_range+0x693/0x830
 [<ffffffff81772697>] inet_sendmsg+0x67/0xa0
 [<ffffffff816d93f8>] sock_sendmsg+0x38/0x50
 [<ffffffff816d982f>] SYSC_sendto+0xef/0x170
 [<ffffffff816da27e>] SyS_sendto+0xe/0x10
 [<ffffffff81002910>] do_syscall_64+0x50/0xa0
 [<ffffffff817f7cbc>] entry_SYSCALL64_slow_path+0x25/0x25

Handle by jumping to the failure path if skb_copy_bits gets an EFAULT.

Reproducer:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>

#define LEN 504

int main(int argc, char* argv[])
{
	int fd;
	int zero = 0;
	char buf[LEN];

	memset(buf, 0, LEN);

	fd = socket(AF_INET6, SOCK_RAW, 7);

	setsockopt(fd, SOL_IPV6, IPV6_CHECKSUM, &zero, 4);
	setsockopt(fd, SOL_IPV6, IPV6_DSTOPTS, &buf, LEN);

	sendto(fd, buf, 1, 0, (struct sockaddr *) buf, 110);
}

Signed-off-by: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/ipv6/raw.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -589,7 +589,11 @@ static int rawv6_push_pending_frames(str
 	}
 
 	offset += skb_transport_offset(skb);
-	BUG_ON(skb_copy_bits(skb, offset, &csum, 2));
+	err = skb_copy_bits(skb, offset, &csum, 2);
+	if (err < 0) {
+		ip6_flush_pending_frames(sk);
+		goto out;
+	}
 
 	/* in case cksum was not initialized */
 	if (unlikely(csum))

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 05/27] net, sched: fix soft lockup in tc_classify
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (3 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 04/27] ipv6: handle -EFAULT from skb_copy_bits Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 06/27] net: stmmac: Fix race between stmmac_drv_probe and stmmac_open Greg Kroah-Hartman
                     ` (22 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Shahar Klein, Daniel Borkmann,
	Cong Wang, Eric Dumazet, David S. Miller

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Daniel Borkmann <daniel@iogearbox.net>


[ Upstream commit 628185cfddf1dfb701c4efe2cfd72cf5b09f5702 ]

Shahar reported a soft lockup in tc_classify(), where we run into an
endless loop when walking the classifier chain due to tp->next == tp
which is a state we should never run into. The issue only seems to
trigger under load in the tc control path.

What happens is that in tc_ctl_tfilter(), thread A allocates a new
tp, initializes it, sets tp_created to 1, and calls into tp->ops->change()
with it. In that classifier callback we had to unlock/lock the rtnl
mutex and returned with -EAGAIN. One reason why we need to drop there
is, for example, that we need to request an action module to be loaded.

This happens via tcf_exts_validate() -> tcf_action_init/_1() meaning
after we loaded and found the requested action, we need to redo the
whole request so we don't race against others. While we had to unlock
rtnl in that time, thread B's request was processed next on that CPU.
Thread B added a new tp instance successfully to the classifier chain.
When thread A returned grabbing the rtnl mutex again, propagating -EAGAIN
and destroying its tp instance which never got linked, we goto replay
and redo A's request.

This time when walking the classifier chain in tc_ctl_tfilter() for
checking for existing tp instances we had a priority match and found
the tp instance that was created and linked by thread B. Now calling
again into tp->ops->change() with that tp was successful and returned
without error.

tp_created was never cleared in the second round, thus kernel thinks
that we need to link it into the classifier chain (once again). tp and
*back point to the same object due to the match we had earlier on. Thus
for thread B's already public tp, we reset tp->next to tp itself and
link it into the chain, which eventually causes the mentioned endless
loop in tc_classify() once a packet hits the data path.

Fix is to clear tp_created at the beginning of each request, also when
we replay it. On the paths that can cause -EAGAIN we already destroy
the original tp instance we had and on replay we really need to start
from scratch. It seems that this issue was first introduced in commit
12186be7d2e1 ("net_cls: fix unconfigured struct tcf_proto keeps chaining
and avoid kernel panic when we use cls_cgroup").

Fixes: 12186be7d2e1 ("net_cls: fix unconfigured struct tcf_proto keeps chaining and avoid kernel panic when we use cls_cgroup")
Reported-by: Shahar Klein <shahark@mellanox.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Tested-by: Shahar Klein <shahark@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/sched/cls_api.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -137,13 +137,15 @@ static int tc_ctl_tfilter(struct sk_buff
 	unsigned long cl;
 	unsigned long fh;
 	int err;
-	int tp_created = 0;
+	int tp_created;
 
 	if ((n->nlmsg_type != RTM_GETTFILTER) &&
 	    !netlink_ns_capable(skb, net->user_ns, CAP_NET_ADMIN))
 		return -EPERM;
 
 replay:
+	tp_created = 0;
+
 	err = nlmsg_parse(n, sizeof(*t), tca, TCA_MAX, NULL);
 	if (err < 0)
 		return err;

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 06/27] net: stmmac: Fix race between stmmac_drv_probe and stmmac_open
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (4 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 05/27] net, sched: fix soft lockup in tc_classify Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 07/27] net/mlx5: Check FW limitations on log_max_qp before setting it Greg Kroah-Hartman
                     ` (21 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Kweh, Hock Leong, Florian Fainelli,
	David S. Miller

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Florian Fainelli <f.fainelli@gmail.com>


[ Upstream commit 5701659004d68085182d2fd4199c79172165fa65 ]

There is currently a small window during which the network device registered by
stmmac can be made visible, yet all resources, including and clock and MDIO bus
have not had a chance to be set up, this can lead to the following error to
occur:

[  473.919358] stmmaceth 0000:01:00.0 (unnamed net_device) (uninitialized):
                stmmac_dvr_probe: warning: cannot get CSR clock
[  473.919382] stmmaceth 0000:01:00.0: no reset control found
[  473.919412] stmmac - user ID: 0x10, Synopsys ID: 0x42
[  473.919429] stmmaceth 0000:01:00.0: DMA HW capability register supported
[  473.919436] stmmaceth 0000:01:00.0: RX Checksum Offload Engine supported
[  473.919443] stmmaceth 0000:01:00.0: TX Checksum insertion supported
[  473.919451] stmmaceth 0000:01:00.0 (unnamed net_device) (uninitialized):
                Enable RX Mitigation via HW Watchdog Timer
[  473.921395] libphy: PHY stmmac-1:00 not found
[  473.921417] stmmaceth 0000:01:00.0 eth0: Could not attach to PHY
[  473.921427] stmmaceth 0000:01:00.0 eth0: stmmac_open: Cannot attach to
                PHY (error: -19)
[  473.959710] libphy: stmmac: probed
[  473.959724] stmmaceth 0000:01:00.0 eth0: PHY ID 01410cc2 at 0 IRQ POLL
                (stmmac-1:00) active
[  473.959728] stmmaceth 0000:01:00.0 eth0: PHY ID 01410cc2 at 1 IRQ POLL
                (stmmac-1:01)
[  473.959731] stmmaceth 0000:01:00.0 eth0: PHY ID 01410cc2 at 2 IRQ POLL
                (stmmac-1:02)
[  473.959734] stmmaceth 0000:01:00.0 eth0: PHY ID 01410cc2 at 3 IRQ POLL
                (stmmac-1:03)

Fix this by making sure that register_netdev() is the last thing being done,
which guarantees that the clock and the MDIO bus are available.

Fixes: 4bfcbd7abce2 ("stmmac: Move the mdio_register/_unregister in probe/remove")
Reported-by: Kweh, Hock Leong <hock.leong.kweh@intel.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |   22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2939,12 +2939,6 @@ int stmmac_dvr_probe(struct device *devi
 	spin_lock_init(&priv->lock);
 	spin_lock_init(&priv->tx_lock);
 
-	ret = register_netdev(ndev);
-	if (ret) {
-		pr_err("%s: ERROR %i registering the device\n", __func__, ret);
-		goto error_netdev_register;
-	}
-
 	/* If a specific clk_csr value is passed from the platform
 	 * this means that the CSR Clock Range selection cannot be
 	 * changed at run-time and it is fixed. Viceversa the driver'll try to
@@ -2969,11 +2963,21 @@ int stmmac_dvr_probe(struct device *devi
 		}
 	}
 
-	return 0;
+	ret = register_netdev(ndev);
+	if (ret) {
+		netdev_err(priv->dev, "%s: ERROR %i registering the device\n",
+			   __func__, ret);
+		goto error_netdev_register;
+	}
+
+	return ret;
 
-error_mdio_register:
-	unregister_netdev(ndev);
 error_netdev_register:
+	if (priv->pcs != STMMAC_PCS_RGMII &&
+	    priv->pcs != STMMAC_PCS_TBI &&
+	    priv->pcs != STMMAC_PCS_RTBI)
+		stmmac_mdio_unregister(ndev);
+error_mdio_register:
 	netif_napi_del(&priv->napi);
 error_hw_init:
 	clk_disable_unprepare(priv->pclk);

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 07/27] net/mlx5: Check FW limitations on log_max_qp before setting it
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (5 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 06/27] net: stmmac: Fix race between stmmac_drv_probe and stmmac_open Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 08/27] net/mlx5: Avoid shadowing numa_node Greg Kroah-Hartman
                     ` (20 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Noa Osherovich, Saeed Mahameed,
	David S. Miller

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Noa Osherovich <noaos@mellanox.com>


[ Upstream commit 883371c453b937f9eb581fb4915210865982736f ]

When setting HCA capabilities, set log_max_qp to be the minimum
between the selected profile's value and the HCA limitation.

Fixes: 938fe83c8dcb ('net/mlx5_core: New device capabilities...')
Signed-off-by: Noa Osherovich <noaos@mellanox.com>
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/main.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -432,6 +432,13 @@ static int handle_hca_cap(struct mlx5_co
 	MLX5_SET(cmd_hca_cap, set_hca_cap, pkey_table_size,
 		 to_fw_pkey_sz(128));
 
+	/* Check log_max_qp from HCA caps to set in current profile */
+	if (MLX5_CAP_GEN_MAX(dev, log_max_qp) < profile[prof_sel].log_max_qp) {
+		mlx5_core_warn(dev, "log_max_qp value in current profile is %d, changing it to HCA capability limit (%d)\n",
+			       profile[prof_sel].log_max_qp,
+			       MLX5_CAP_GEN_MAX(dev, log_max_qp));
+		profile[prof_sel].log_max_qp = MLX5_CAP_GEN_MAX(dev, log_max_qp);
+	}
 	if (prof->mask & MLX5_PROF_MASK_QP_SIZE)
 		MLX5_SET(cmd_hca_cap, set_hca_cap, log_max_qp,
 			 prof->log_max_qp);

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 08/27] net/mlx5: Avoid shadowing numa_node
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (6 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 07/27] net/mlx5: Check FW limitations on log_max_qp before setting it Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 09/27] drop_monitor: add missing call to genlmsg_end Greg Kroah-Hartman
                     ` (19 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Eli Cohen, Saeed Mahameed, David S. Miller

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Eli Cohen <eli@mellanox.com>


[ Upstream commit d151d73dcc99de87c63bdefebcc4cb69de1cdc40 ]

Avoid using a local variable named numa_node to avoid shadowing a public
one.

Fixes: db058a186f98 ('net/mlx5_core: Set irq affinity hints')
Signed-off-by: Eli Cohen <eli@mellanox.com>
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/main.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -512,7 +512,6 @@ static int mlx5_irq_set_affinity_hint(st
 	struct mlx5_priv *priv  = &mdev->priv;
 	struct msix_entry *msix = priv->msix_arr;
 	int irq                 = msix[i + MLX5_EQ_VEC_COMP_BASE].vector;
-	int numa_node           = priv->numa_node;
 	int err;
 
 	if (!zalloc_cpumask_var(&priv->irq_info[i].mask, GFP_KERNEL)) {
@@ -520,7 +519,7 @@ static int mlx5_irq_set_affinity_hint(st
 		return -ENOMEM;
 	}
 
-	cpumask_set_cpu(cpumask_local_spread(i, numa_node),
+	cpumask_set_cpu(cpumask_local_spread(i, priv->numa_node),
 			priv->irq_info[i].mask);
 
 	err = irq_set_affinity_hint(irq, priv->irq_info[i].mask);

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 09/27] drop_monitor: add missing call to genlmsg_end
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (7 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 08/27] net/mlx5: Avoid shadowing numa_node Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 10/27] drop_monitor: consider inserted data in genlmsg_end Greg Kroah-Hartman
                     ` (18 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Reiter Wolfgang, Neil Horman,
	David S. Miller

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Reiter Wolfgang <wr0112358@gmail.com>


[ Upstream commit 4200462d88f47f3759bdf4705f87e207b0f5b2e4 ]

Update nlmsg_len field with genlmsg_end to enable userspace processing
using nlmsg_next helper. Also adds error handling.

Signed-off-by: Reiter Wolfgang <wr0112358@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/core/drop_monitor.c |   33 ++++++++++++++++++++++++---------
 1 file changed, 24 insertions(+), 9 deletions(-)

--- a/net/core/drop_monitor.c
+++ b/net/core/drop_monitor.c
@@ -80,6 +80,7 @@ static struct sk_buff *reset_per_cpu_dat
 	struct nlattr *nla;
 	struct sk_buff *skb;
 	unsigned long flags;
+	void *msg_header;
 
 	al = sizeof(struct net_dm_alert_msg);
 	al += dm_hit_limit * sizeof(struct net_dm_drop_point);
@@ -87,17 +88,31 @@ static struct sk_buff *reset_per_cpu_dat
 
 	skb = genlmsg_new(al, GFP_KERNEL);
 
-	if (skb) {
-		genlmsg_put(skb, 0, 0, &net_drop_monitor_family,
-				0, NET_DM_CMD_ALERT);
-		nla = nla_reserve(skb, NLA_UNSPEC,
-				  sizeof(struct net_dm_alert_msg));
-		msg = nla_data(nla);
-		memset(msg, 0, al);
-	} else {
-		mod_timer(&data->send_timer, jiffies + HZ / 10);
+	if (!skb)
+		goto err;
+
+	msg_header = genlmsg_put(skb, 0, 0, &net_drop_monitor_family,
+				 0, NET_DM_CMD_ALERT);
+	if (!msg_header) {
+		nlmsg_free(skb);
+		skb = NULL;
+		goto err;
+	}
+	nla = nla_reserve(skb, NLA_UNSPEC,
+			  sizeof(struct net_dm_alert_msg));
+	if (!nla) {
+		nlmsg_free(skb);
+		skb = NULL;
+		goto err;
 	}
+	msg = nla_data(nla);
+	memset(msg, 0, al);
+	genlmsg_end(skb, msg_header);
+	goto out;
 
+err:
+	mod_timer(&data->send_timer, jiffies + HZ / 10);
+out:
 	spin_lock_irqsave(&data->lock, flags);
 	swap(data->skb, skb);
 	spin_unlock_irqrestore(&data->lock, flags);

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 10/27] drop_monitor: consider inserted data in genlmsg_end
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (8 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 09/27] drop_monitor: add missing call to genlmsg_end Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 11/27] igmp: Make igmp group member RFC 3376 compliant Greg Kroah-Hartman
                     ` (17 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Reiter Wolfgang, Neil Horman,
	David S. Miller

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Reiter Wolfgang <wr0112358@gmail.com>


[ Upstream commit 3b48ab2248e61408910e792fe84d6ec466084c1a ]

Final nlmsg_len field update must reflect inserted net_dm_drop_point
data.

This patch depends on previous patch:
"drop_monitor: add missing call to genlmsg_end"

Signed-off-by: Reiter Wolfgang <wr0112358@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/core/drop_monitor.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

--- a/net/core/drop_monitor.c
+++ b/net/core/drop_monitor.c
@@ -107,7 +107,6 @@ static struct sk_buff *reset_per_cpu_dat
 	}
 	msg = nla_data(nla);
 	memset(msg, 0, al);
-	genlmsg_end(skb, msg_header);
 	goto out;
 
 err:
@@ -117,6 +116,13 @@ out:
 	swap(data->skb, skb);
 	spin_unlock_irqrestore(&data->lock, flags);
 
+	if (skb) {
+		struct nlmsghdr *nlh = (struct nlmsghdr *)skb->data;
+		struct genlmsghdr *gnlh = (struct genlmsghdr *)nlmsg_data(nlh);
+
+		genlmsg_end(skb, genlmsg_data(gnlh));
+	}
+
 	return skb;
 }
 

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 11/27] igmp: Make igmp group member RFC 3376 compliant
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (9 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 10/27] drop_monitor: consider inserted data in genlmsg_end Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 12/27] ipv4: Do not allow MAIN to be alias for new LOCAL w/ custom rules Greg Kroah-Hartman
                     ` (16 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Michal Tesar, David S. Miller

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Michal Tesar <mtesar@redhat.com>


[ Upstream commit 7ababb782690e03b78657e27bd051e20163af2d6 ]

5.2. Action on Reception of a Query

 When a system receives a Query, it does not respond immediately.
 Instead, it delays its response by a random amount of time, bounded
 by the Max Resp Time value derived from the Max Resp Code in the
 received Query message.  A system may receive a variety of Queries on
 different interfaces and of different kinds (e.g., General Queries,
 Group-Specific Queries, and Group-and-Source-Specific Queries), each
 of which may require its own delayed response.

 Before scheduling a response to a Query, the system must first
 consider previously scheduled pending responses and in many cases
 schedule a combined response.  Therefore, the system must be able to
 maintain the following state:

 o A timer per interface for scheduling responses to General Queries.

 o A per-group and interface timer for scheduling responses to Group-
   Specific and Group-and-Source-Specific Queries.

 o A per-group and interface list of sources to be reported in the
   response to a Group-and-Source-Specific Query.

 When a new Query with the Router-Alert option arrives on an
 interface, provided the system has state to report, a delay for a
 response is randomly selected in the range (0, [Max Resp Time]) where
 Max Resp Time is derived from Max Resp Code in the received Query
 message.  The following rules are then used to determine if a Report
 needs to be scheduled and the type of Report to schedule.  The rules
 are considered in order and only the first matching rule is applied.

 1. If there is a pending response to a previous General Query
    scheduled sooner than the selected delay, no additional response
    needs to be scheduled.

 2. If the received Query is a General Query, the interface timer is
    used to schedule a response to the General Query after the
    selected delay.  Any previously pending response to a General
    Query is canceled.
--8<--

Currently the timer is rearmed with new random expiration time for
every incoming query regardless of possibly already pending report.
Which is not aligned with the above RFE.
It also might happen that higher rate of incoming queries can
postpone the report after the expiration time of the first query
causing group membership loss.

Now the per interface general query timer is rearmed only
when there is no pending report already scheduled on that interface or
the newly selected expiration time is before the already pending
scheduled report.

Signed-off-by: Michal Tesar <mtesar@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/ipv4/igmp.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -225,9 +225,14 @@ static void igmp_start_timer(struct ip_m
 static void igmp_gq_start_timer(struct in_device *in_dev)
 {
 	int tv = prandom_u32() % in_dev->mr_maxdelay;
+	unsigned long exp = jiffies + tv + 2;
+
+	if (in_dev->mr_gq_running &&
+	    time_after_eq(exp, (in_dev->mr_gq_timer).expires))
+		return;
 
 	in_dev->mr_gq_running = 1;
-	if (!mod_timer(&in_dev->mr_gq_timer, jiffies+tv+2))
+	if (!mod_timer(&in_dev->mr_gq_timer, exp))
 		in_dev_hold(in_dev);
 }
 

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 12/27] ipv4: Do not allow MAIN to be alias for new LOCAL w/ custom rules
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (10 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 11/27] igmp: Make igmp group member RFC 3376 compliant Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 13/27] r8152: split rtl8152_suspend function Greg Kroah-Hartman
                     ` (15 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Oliver Brunel, Alexander Duyck,
	David S. Miller

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Alexander Duyck <alexander.h.duyck@intel.com>


[ Upstream commit 5350d54f6cd12eaff623e890744c79b700bd3f17 ]

In the case of custom rules being present we need to handle the case of the
LOCAL table being intialized after the new rule has been added.  To address
that I am adding a new check so that we can make certain we don't use an
alias of MAIN for LOCAL when allocating a new table.

Fixes: 0ddcf43d5d4a ("ipv4: FIB Local/MAIN table collapse")
Reported-by: Oliver Brunel <jjk@jjacky.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/ipv4/fib_frontend.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -85,7 +85,7 @@ struct fib_table *fib_new_table(struct n
 	if (tb)
 		return tb;
 
-	if (id == RT_TABLE_LOCAL)
+	if (id == RT_TABLE_LOCAL && !net->ipv4.fib_has_custom_rules)
 		alias = fib_new_table(net, RT_TABLE_MAIN);
 
 	tb = fib_trie_table(id, alias);

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 13/27] r8152: split rtl8152_suspend function
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (11 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 12/27] ipv4: Do not allow MAIN to be alias for new LOCAL w/ custom rules Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 14/27] r8152: fix rx issue for runtime suspend Greg Kroah-Hartman
                     ` (14 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Hayes Wang, David S. Miller

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: hayeswang <hayeswang@realtek.com>


[ Upstream commit 8fb280616878b81c0790a0c33acbeec59c5711f4 ]

Split rtl8152_suspend() into rtl8152_system_suspend() and
rtl8152_rumtime_suspend().

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/usb/r8152.c |   57 +++++++++++++++++++++++++++++++++---------------
 1 file changed, 40 insertions(+), 17 deletions(-)

--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -3446,39 +3446,62 @@ static bool delay_autosuspend(struct r81
 		return false;
 }
 
-static int rtl8152_suspend(struct usb_interface *intf, pm_message_t message)
+static int rtl8152_rumtime_suspend(struct r8152 *tp)
 {
-	struct r8152 *tp = usb_get_intfdata(intf);
 	struct net_device *netdev = tp->netdev;
 	int ret = 0;
 
-	mutex_lock(&tp->control);
-
-	if (PMSG_IS_AUTO(message)) {
-		if (netif_running(netdev) && delay_autosuspend(tp)) {
+	if (netif_running(netdev) && test_bit(WORK_ENABLE, &tp->flags)) {
+		if (delay_autosuspend(tp)) {
 			ret = -EBUSY;
 			goto out1;
 		}
 
-		set_bit(SELECTIVE_SUSPEND, &tp->flags);
-	} else {
-		netif_device_detach(netdev);
+		clear_bit(WORK_ENABLE, &tp->flags);
+		usb_kill_urb(tp->intr_urb);
+		napi_disable(&tp->napi);
+		rtl_stop_rx(tp);
+		rtl_runtime_suspend_enable(tp, true);
+		napi_enable(&tp->napi);
 	}
 
+	set_bit(SELECTIVE_SUSPEND, &tp->flags);
+
+out1:
+	return ret;
+}
+
+static int rtl8152_system_suspend(struct r8152 *tp)
+{
+	struct net_device *netdev = tp->netdev;
+	int ret = 0;
+
+	netif_device_detach(netdev);
+
 	if (netif_running(netdev) && test_bit(WORK_ENABLE, &tp->flags)) {
 		clear_bit(WORK_ENABLE, &tp->flags);
 		usb_kill_urb(tp->intr_urb);
 		napi_disable(&tp->napi);
-		if (test_bit(SELECTIVE_SUSPEND, &tp->flags)) {
-			rtl_stop_rx(tp);
-			rtl_runtime_suspend_enable(tp, true);
-		} else {
-			cancel_delayed_work_sync(&tp->schedule);
-			tp->rtl_ops.down(tp);
-		}
+		cancel_delayed_work_sync(&tp->schedule);
+		tp->rtl_ops.down(tp);
 		napi_enable(&tp->napi);
 	}
-out1:
+
+	return ret;
+}
+
+static int rtl8152_suspend(struct usb_interface *intf, pm_message_t message)
+{
+	struct r8152 *tp = usb_get_intfdata(intf);
+	int ret;
+
+	mutex_lock(&tp->control);
+
+	if (PMSG_IS_AUTO(message))
+		ret = rtl8152_rumtime_suspend(tp);
+	else
+		ret = rtl8152_system_suspend(tp);
+
 	mutex_unlock(&tp->control);
 
 	return ret;

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 14/27] r8152: fix rx issue for runtime suspend
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (12 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 13/27] r8152: split rtl8152_suspend function Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 15/27] gro: Enter slow-path if there is no tailroom Greg Kroah-Hartman
                     ` (13 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Hayes Wang, David S. Miller

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: hayeswang <hayeswang@realtek.com>


[ Upstream commit 75dc692eda114cb234a46cb11893a9c3ea520934 ]

Pause the rx and make sure the rx fifo is empty when the autosuspend
occurs.

If the rx data comes when the driver is canceling the rx urb, the host
controller would stop getting the data from the device and continue
it after next rx urb is submitted. That is, one continuing data is
split into two different urb buffers. That let the driver take the
data as a rx descriptor, and unexpected behavior happens.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/usb/r8152.c |   31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -3452,17 +3452,42 @@ static int rtl8152_rumtime_suspend(struc
 	int ret = 0;
 
 	if (netif_running(netdev) && test_bit(WORK_ENABLE, &tp->flags)) {
+		u32 rcr = 0;
+
 		if (delay_autosuspend(tp)) {
 			ret = -EBUSY;
 			goto out1;
 		}
 
+		if (netif_carrier_ok(netdev)) {
+			u32 ocp_data;
+
+			rcr = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR);
+			ocp_data = rcr & ~RCR_ACPT_ALL;
+			ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data);
+			rxdy_gated_en(tp, true);
+			ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA,
+						 PLA_OOB_CTRL);
+			if (!(ocp_data & RXFIFO_EMPTY)) {
+				rxdy_gated_en(tp, false);
+				ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, rcr);
+				ret = -EBUSY;
+				goto out1;
+			}
+		}
+
 		clear_bit(WORK_ENABLE, &tp->flags);
 		usb_kill_urb(tp->intr_urb);
-		napi_disable(&tp->napi);
-		rtl_stop_rx(tp);
+
 		rtl_runtime_suspend_enable(tp, true);
-		napi_enable(&tp->napi);
+
+		if (netif_carrier_ok(netdev)) {
+			napi_disable(&tp->napi);
+			rtl_stop_rx(tp);
+			rxdy_gated_en(tp, false);
+			ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, rcr);
+			napi_enable(&tp->napi);
+		}
 	}
 
 	set_bit(SELECTIVE_SUSPEND, &tp->flags);

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 15/27] gro: Enter slow-path if there is no tailroom
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (13 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 14/27] r8152: fix rx issue for runtime suspend Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 16/27] gro: use min_t() in skb_gro_reset_offset() Greg Kroah-Hartman
                     ` (12 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Slava Shwartsman, Herbert Xu,
	Eric Dumazet, David S. Miller

4.4-stable review patch.  If anyone has any objections, please let me know.

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

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


[ Upstream commit 1272ce87fa017ca4cf32920764d879656b7a005a ]

The GRO path has a fast-path where we avoid calling pskb_may_pull
and pskb_expand by directly accessing frag0.  However, this should
only be done if we have enough tailroom in the skb as otherwise
we'll have to expand it later anyway.

This patch adds the check by capping frag0_len with the skb tailroom.

Fixes: cb18978cbf45 ("gro: Open-code final pskb_may_pull")
Reported-by: Slava Shwartsman <slavash@mellanox.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-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/core/dev.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4187,7 +4187,8 @@ static void skb_gro_reset_offset(struct
 	    pinfo->nr_frags &&
 	    !PageHighMem(skb_frag_page(frag0))) {
 		NAPI_GRO_CB(skb)->frag0 = skb_frag_address(frag0);
-		NAPI_GRO_CB(skb)->frag0_len = skb_frag_size(frag0);
+		NAPI_GRO_CB(skb)->frag0_len = min(skb_frag_size(frag0),
+						  skb->end - skb->tail);
 	}
 }
 

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 16/27] gro: use min_t() in skb_gro_reset_offset()
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (14 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 15/27] gro: Enter slow-path if there is no tailroom Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 17/27] gro: Disable frag0 optimization on IPv6 ext headers Greg Kroah-Hartman
                     ` (11 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, kernel test robot, Eric Dumazet,
	David S. Miller

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Eric Dumazet <edumazet@google.com>


[ Upstream commit 7cfd5fd5a9813f1430290d20c0fead9b4582a307 ]

On 32bit arches, (skb->end - skb->data) is not 'unsigned int',
so we shall use min_t() instead of min() to avoid a compiler error.

Fixes: 1272ce87fa01 ("gro: Enter slow-path if there is no tailroom")
Reported-by: kernel test robot <fengguang.wu@intel.com>
Signed-off-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/core/dev.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4187,8 +4187,9 @@ static void skb_gro_reset_offset(struct
 	    pinfo->nr_frags &&
 	    !PageHighMem(skb_frag_page(frag0))) {
 		NAPI_GRO_CB(skb)->frag0 = skb_frag_address(frag0);
-		NAPI_GRO_CB(skb)->frag0_len = min(skb_frag_size(frag0),
-						  skb->end - skb->tail);
+		NAPI_GRO_CB(skb)->frag0_len = min_t(unsigned int,
+						    skb_frag_size(frag0),
+						    skb->end - skb->tail);
 	}
 }
 

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 17/27] gro: Disable frag0 optimization on IPv6 ext headers
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (15 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 16/27] gro: use min_t() in skb_gro_reset_offset() Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 18/27] net: ipv4: Fix multipath selection with vrf Greg Kroah-Hartman
                     ` (10 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Slava Shwartsman, Herbert Xu,
	Eric Dumazet, David S. Miller

4.4-stable review patch.  If anyone has any objections, please let me know.

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

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


[ Upstream commit 57ea52a865144aedbcd619ee0081155e658b6f7d ]

The GRO fast path caches the frag0 address.  This address becomes
invalid if frag0 is modified by pskb_may_pull or its variants.
So whenever that happens we must disable the frag0 optimization.

This is usually done through the combination of gro_header_hard
and gro_header_slow, however, the IPv6 extension header path did
the pulling directly and would continue to use the GRO fast path
incorrectly.

This patch fixes it by disabling the fast path when we enter the
IPv6 extension header path.

Fixes: 78a478d0efd9 ("gro: Inline skb_gro_header and cache frag0 virtual address")
Reported-by: Slava Shwartsman <slavash@mellanox.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/linux/netdevice.h |    9 +++++++--
 net/ipv6/ip6_offload.c    |    1 +
 2 files changed, 8 insertions(+), 2 deletions(-)

--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2325,14 +2325,19 @@ static inline int skb_gro_header_hard(st
 	return NAPI_GRO_CB(skb)->frag0_len < hlen;
 }
 
+static inline void skb_gro_frag0_invalidate(struct sk_buff *skb)
+{
+	NAPI_GRO_CB(skb)->frag0 = NULL;
+	NAPI_GRO_CB(skb)->frag0_len = 0;
+}
+
 static inline void *skb_gro_header_slow(struct sk_buff *skb, unsigned int hlen,
 					unsigned int offset)
 {
 	if (!pskb_may_pull(skb, hlen))
 		return NULL;
 
-	NAPI_GRO_CB(skb)->frag0 = NULL;
-	NAPI_GRO_CB(skb)->frag0_len = 0;
+	skb_gro_frag0_invalidate(skb);
 	return skb->data + offset;
 }
 
--- a/net/ipv6/ip6_offload.c
+++ b/net/ipv6/ip6_offload.c
@@ -196,6 +196,7 @@ static struct sk_buff **ipv6_gro_receive
 	ops = rcu_dereference(inet6_offloads[proto]);
 	if (!ops || !ops->callbacks.gro_receive) {
 		__pskb_pull(skb, skb_gro_offset(skb));
+		skb_gro_frag0_invalidate(skb);
 		proto = ipv6_gso_pull_exthdrs(skb, proto);
 		skb_gro_pull(skb, -skb_transport_offset(skb));
 		skb_reset_transport_header(skb);

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 18/27] net: ipv4: Fix multipath selection with vrf
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (16 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 17/27] gro: Disable frag0 optimization on IPv6 ext headers Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 19/27] net: vrf: do not allow table id 0 Greg Kroah-Hartman
                     ` (9 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, David Ahern, David S. Miller

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: David Ahern <dsa@cumulusnetworks.com>


[ Upstream commit 7a18c5b9fb31a999afc62b0e60978aa896fc89e9 ]

fib_select_path does not call fib_select_multipath if oif is set in the
flow struct. For VRF use cases oif is always set, so multipath route
selection is bypassed. Use the FLOWI_FLAG_SKIP_NH_OIF to skip the oif
check similar to what is done in fib_table_lookup.

Add saddr and proto to the flow struct for the fib lookup done by the
VRF driver to better match hash computation for a flow.

Fixes: 613d09b30f8b ("net: Use VRF device index for lookups on TX")
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/vrf.c        |    2 ++
 net/ipv4/fib_semantics.c |    9 +++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -301,7 +301,9 @@ static netdev_tx_t vrf_process_v4_outbou
 		.flowi4_tos = RT_TOS(ip4h->tos),
 		.flowi4_flags = FLOWI_FLAG_ANYSRC | FLOWI_FLAG_L3MDEV_SRC |
 				FLOWI_FLAG_SKIP_NH_OIF,
+		.flowi4_proto = ip4h->protocol,
 		.daddr = ip4h->daddr,
+		.saddr = ip4h->saddr,
 	};
 
 	if (vrf_send_v4_prep(skb, &fl4, vrf_dev))
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -1588,8 +1588,13 @@ void fib_select_multipath(struct fib_res
 void fib_select_path(struct net *net, struct fib_result *res,
 		     struct flowi4 *fl4, int mp_hash)
 {
+	bool oif_check;
+
+	oif_check = (fl4->flowi4_oif == 0 ||
+		     fl4->flowi4_flags & FLOWI_FLAG_SKIP_NH_OIF);
+
 #ifdef CONFIG_IP_ROUTE_MULTIPATH
-	if (res->fi->fib_nhs > 1 && fl4->flowi4_oif == 0) {
+	if (res->fi->fib_nhs > 1 && oif_check) {
 		if (mp_hash < 0)
 			mp_hash = get_hash_from_flowi4(fl4) >> 1;
 
@@ -1599,7 +1604,7 @@ void fib_select_path(struct net *net, st
 #endif
 	if (!res->prefixlen &&
 	    res->table->tb_num_default > 1 &&
-	    res->type == RTN_UNICAST && !fl4->flowi4_oif)
+	    res->type == RTN_UNICAST && oif_check)
 		fib_select_default(fl4, res);
 
 	if (!fl4->saddr)

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 19/27] net: vrf: do not allow table id 0
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (17 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 18/27] net: ipv4: Fix multipath selection with vrf Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 20/27] HID: hid-cypress: validate length of report Greg Kroah-Hartman
                     ` (8 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Frank Kellermann, David Ahern,
	David S. Miller

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: David Ahern <dsa@cumulusnetworks.com>


[ Upstream commit 24c63bbc18e25d5d8439422aa5fd2d66390b88eb ]

Frank reported that vrf devices can be created with a table id of 0.
This breaks many of the run time table id checks and should not be
allowed. Detect this condition at create time and fail with EINVAL.

Fixes: 193125dbd8eb ("net: Introduce VRF device driver")
Reported-by: Frank Kellermann <frank.kellermann@atos.net>
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/vrf.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -925,6 +925,8 @@ static int vrf_newlink(struct net *src_n
 		return -EINVAL;
 
 	vrf->tb_id = nla_get_u32(data[IFLA_VRF_TABLE]);
+	if (vrf->tb_id == RT_TABLE_UNSPEC)
+		return -EINVAL;
 
 	dev->priv_flags |= IFF_L3MDEV_MASTER;
 

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 20/27] HID: hid-cypress: validate length of report
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (18 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 19/27] net: vrf: do not allow table id 0 Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 21/27] ALSA: firewire-tascam: Fix to handle error from initialization of stream data Greg Kroah-Hartman
                     ` (7 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Benoit Camredon, Jiri Kosina

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1ebb71143758f45dc0fa76e2f48429e13b16d110 upstream.

Make sure we have enough of a report structure to validate before
looking at it.

Reported-by: Benoit Camredon <benoit.camredon@airbus.com>
Tested-by: Benoit Camredon <benoit.camredon@airbus.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

---
 drivers/hid/hid-cypress.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/hid/hid-cypress.c
+++ b/drivers/hid/hid-cypress.c
@@ -39,6 +39,9 @@ static __u8 *cp_report_fixup(struct hid_
 	if (!(quirks & CP_RDESC_SWAPPED_MIN_MAX))
 		return rdesc;
 
+	if (*rsize < 4)
+		return rdesc;
+
 	for (i = 0; i < *rsize - 4; i++)
 		if (rdesc[i] == 0x29 && rdesc[i + 2] == 0x19) {
 			rdesc[i] = 0x19;

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 21/27] ALSA: firewire-tascam: Fix to handle error from initialization of stream data
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (19 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 20/27] HID: hid-cypress: validate length of report Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 22/27] powerpc: Fix build warning on 32-bit PPC Greg Kroah-Hartman
                     ` (6 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Takashi Sakamoto, Takashi Iwai

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Takashi Sakamoto <o-takashi@sakamocchi.jp>

commit 6a2a2f45560a9cb7bc49820883b042e44f83726c upstream.

This module has a bug not to return error code in a case that data
structure for transmitted packets fails to be initialized.

This commit fixes the bug.

Fixes: 35efa5c489de ("ALSA: firewire-tascam: add streaming functionality")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/firewire/tascam/tascam-stream.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/firewire/tascam/tascam-stream.c
+++ b/sound/firewire/tascam/tascam-stream.c
@@ -343,7 +343,7 @@ int snd_tscm_stream_init_duplex(struct s
 	if (err < 0)
 		amdtp_stream_destroy(&tscm->rx_stream);
 
-	return 0;
+	return err;
 }
 
 /* At bus reset, streaming is stopped and some registers are clear. */

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 22/27] powerpc: Fix build warning on 32-bit PPC
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (20 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 21/27] ALSA: firewire-tascam: Fix to handle error from initialization of stream data Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 23/27] ARM: zynq: Reserve correct amount of non-DMA RAM Greg Kroah-Hartman
                     ` (5 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Larry Finger, Nicholas Piggin,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	linuxppc-dev, Linus Torvalds

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Larry Finger <Larry.Finger@lwfinger.net>

commit 8ae679c4bc2ea2d16d92620da8e3e9332fa4039f upstream.

I am getting the following warning when I build kernel 4.9-git on my
PowerBook G4 with a 32-bit PPC processor:

    AS      arch/powerpc/kernel/misc_32.o
  arch/powerpc/kernel/misc_32.S:299:7: warning: "CONFIG_FSL_BOOKE" is not defined [-Wundef]

This problem is evident after commit 989cea5c14be ("kbuild: prevent
lib-ksyms.o rebuilds"); however, this change in kbuild only exposes an
error that has been in the code since 2005 when this source file was
created.  That was with commit 9994a33865f4 ("powerpc: Introduce
entry_{32,64}.S, misc_{32,64}.S, systbl.S").

The offending line does not make a lot of sense.  This error does not
seem to cause any errors in the executable, thus I am not recommending
that it be applied to any stable versions.

Thanks to Nicholas Piggin for suggesting this solution.

Fixes: 9994a33865f4 ("powerpc: Introduce entry_{32,64}.S, misc_{32,64}.S, systbl.S")
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/powerpc/kernel/misc_32.S |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/powerpc/kernel/misc_32.S
+++ b/arch/powerpc/kernel/misc_32.S
@@ -313,7 +313,7 @@ _GLOBAL(flush_instruction_cache)
 	lis	r3, KERNELBASE@h
 	iccci	0,r3
 #endif
-#elif CONFIG_FSL_BOOKE
+#elif defined(CONFIG_FSL_BOOKE)
 BEGIN_FTR_SECTION
 	mfspr   r3,SPRN_L1CSR0
 	ori     r3,r3,L1CSR0_CFI|L1CSR0_CLFC

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 23/27] ARM: zynq: Reserve correct amount of non-DMA RAM
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (21 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 22/27] powerpc: Fix build warning on 32-bit PPC Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 24/27] ARM: OMAP4+: Fix bad fallthrough for cpuidle Greg Kroah-Hartman
                     ` (4 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Kyle Roeschley, Nathan Rossi, Michal Simek

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Kyle Roeschley <kyle.roeschley@ni.com>

commit 7a3cc2a7b2c723aa552028f4e66841cec183756d upstream.

On Zynq, we haven't been reserving the correct amount of DMA-incapable
RAM to keep DMA away from it (per the Zynq TRM Section 4.1, it should be
the first 512k). In older kernels, this was masked by the
memblock_reserve call in arm_memblock_init(). Now, reserve the correct
amount excplicitly rather than relying on swapper_pg_dir, which is an
address and not a size anyway.

Fixes: 46f5b96 ("ARM: zynq: Reserve not DMAable space in front of the kernel")
Signed-off-by: Kyle Roeschley <kyle.roeschley@ni.com>
Tested-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm/mach-zynq/common.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/arm/mach-zynq/common.c
+++ b/arch/arm/mach-zynq/common.c
@@ -59,7 +59,7 @@ void __iomem *zynq_scu_base;
 static void __init zynq_memory_init(void)
 {
 	if (!__pa(PAGE_OFFSET))
-		memblock_reserve(__pa(PAGE_OFFSET), __pa(swapper_pg_dir));
+		memblock_reserve(__pa(PAGE_OFFSET), 0x80000);
 }
 
 static struct platform_device zynq_cpuidle_device = {

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 24/27] ARM: OMAP4+: Fix bad fallthrough for cpuidle
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (22 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 23/27] ARM: zynq: Reserve correct amount of non-DMA RAM Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 26/27] ALSA: usb-audio: Add a quirk for Plantronics BT600 Greg Kroah-Hartman
                     ` (3 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Santosh Shilimkar, Tony Lindgren

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Tony Lindgren <tony@atomide.com>

commit cbf2642872333547b56b8c4d943f5ed04ac9a4ee upstream.

We don't want to fall through to a bunch of errors for retention
if PM_OMAP4_CPU_OSWR_DISABLE is not configured for a SoC.

Fixes: 6099dd37c669 ("ARM: OMAP5 / DRA7: Enable CPU RET on suspend")
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm/mach-omap2/omap-mpuss-lowpower.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c
+++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
@@ -243,10 +243,9 @@ int omap4_enter_lowpower(unsigned int cp
 		save_state = 1;
 		break;
 	case PWRDM_POWER_RET:
-		if (IS_PM44XX_ERRATUM(PM_OMAP4_CPU_OSWR_DISABLE)) {
+		if (IS_PM44XX_ERRATUM(PM_OMAP4_CPU_OSWR_DISABLE))
 			save_state = 0;
-			break;
-		}
+		break;
 	default:
 		/*
 		 * CPUx CSWR is invalid hardware state. Also CPUx OSWR

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 26/27] ALSA: usb-audio: Add a quirk for Plantronics BT600
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (23 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 24/27] ARM: OMAP4+: Fix bad fallthrough for cpuidle Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 11:38   ` [PATCH 4.4 27/27] mm/init: fix zone boundary creation Greg Kroah-Hartman
                     ` (2 subsequent siblings)
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Dennis Kadioglu, Takashi Iwai

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Dennis Kadioglu <denk@post.com>

commit 2e40795c3bf344cfb5220d94566205796e3ef19a upstream.

Plantronics BT600 does not support reading the sample rate which leads
to many lines of "cannot get freq at ep 0x1" and "cannot get freq at
ep 0x82". This patch adds the USB ID of the BT600 to quirks.c and
avoids those error messages.

Signed-off-by: Dennis Kadioglu <denk@post.com>
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
@@ -1136,6 +1136,7 @@ bool snd_usb_get_sample_rate_quirk(struc
 	case USB_ID(0x045E, 0x076F): /* MS Lifecam HD-6000 */
 	case USB_ID(0x045E, 0x0772): /* MS Lifecam Studio */
 	case USB_ID(0x045E, 0x0779): /* MS Lifecam HD-3000 */
+	case USB_ID(0x047F, 0x02F7): /* Plantronics BT-600 */
 	case USB_ID(0x047F, 0x0415): /* Plantronics BT-300 */
 	case USB_ID(0x047F, 0xAA05): /* Plantronics DA45 */
 	case USB_ID(0x04D8, 0xFEEA): /* Benchmark DAC1 Pre */

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 4.4 27/27] mm/init: fix zone boundary creation
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (24 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 26/27] ALSA: usb-audio: Add a quirk for Plantronics BT600 Greg Kroah-Hartman
@ 2017-01-13 11:38   ` Greg Kroah-Hartman
  2017-01-13 20:19   ` [PATCH 4.4 00/27] 4.4.43-stable review Guenter Roeck
  2017-01-13 21:57   ` Shuah Khan
  27 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-13 11:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Oliver OHalloran, Anton Blanchard,
	Benjamin Herrenschmidt, Paul Mackerras, Mel Gorman,
	Andrew Morton, Linus Torvalds, Arnd Bergmann

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Oliver O'Halloran <oohall@gmail.com>

commit 90cae1fe1c3540f791d5b8e025985fa5e699b2bb upstream.

As a part of memory initialisation the architecture passes an array to
free_area_init_nodes() which specifies the max PFN of each memory zone.
This array is not necessarily monotonic (due to unused zones) so this
array is parsed to build monotonic lists of the min and max PFN for each
zone.  ZONE_MOVABLE is special cased here as its limits are managed by
the mm subsystem rather than the architecture.  Unfortunately, this
special casing is broken when ZONE_MOVABLE is the not the last zone in
the zone list.  The core of the issue is:

	if (i == ZONE_MOVABLE)
		continue;
	arch_zone_lowest_possible_pfn[i] =
		arch_zone_highest_possible_pfn[i-1];

As ZONE_MOVABLE is skipped the lowest_possible_pfn of the next zone will
be set to zero.  This patch fixes this bug by adding explicitly tracking
where the next zone should start rather than relying on the contents
arch_zone_highest_possible_pfn[].

Thie is low priority.  To get bitten by this you need to enable a zone
that appears after ZONE_MOVABLE in the zone_type enum.  As far as I can
tell this means running a kernel with ZONE_DEVICE or ZONE_CMA enabled,
so I can't see this affecting too many people.

I only noticed this because I've been fiddling with ZONE_DEVICE on
powerpc and 4.6 broke my test kernel.  This bug, in conjunction with the
changes in Taku Izumi's kernelcore=mirror patch (d91749c1dda71) and
powerpc being the odd architecture which initialises max_zone_pfn[] to
~0ul instead of 0 caused all of system memory to be placed into
ZONE_DEVICE at boot, followed a panic since device memory cannot be used
for kernel allocations.  I've already submitted a patch to fix the
powerpc specific bits, but I figured this should be fixed too.

Link: http://lkml.kernel.org/r/1462435033-15601-1-git-send-email-oohall@gmail.com
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/page_alloc.c |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5696,15 +5696,18 @@ void __init free_area_init_nodes(unsigne
 				sizeof(arch_zone_lowest_possible_pfn));
 	memset(arch_zone_highest_possible_pfn, 0,
 				sizeof(arch_zone_highest_possible_pfn));
-	arch_zone_lowest_possible_pfn[0] = find_min_pfn_with_active_regions();
-	arch_zone_highest_possible_pfn[0] = max_zone_pfn[0];
-	for (i = 1; i < MAX_NR_ZONES; i++) {
+
+	start_pfn = find_min_pfn_with_active_regions();
+
+	for (i = 0; i < MAX_NR_ZONES; i++) {
 		if (i == ZONE_MOVABLE)
 			continue;
-		arch_zone_lowest_possible_pfn[i] =
-			arch_zone_highest_possible_pfn[i-1];
-		arch_zone_highest_possible_pfn[i] =
-			max(max_zone_pfn[i], arch_zone_lowest_possible_pfn[i]);
+
+		end_pfn = max(max_zone_pfn[i], start_pfn);
+		arch_zone_lowest_possible_pfn[i] = start_pfn;
+		arch_zone_highest_possible_pfn[i] = end_pfn;
+
+		start_pfn = end_pfn;
 	}
 	arch_zone_lowest_possible_pfn[ZONE_MOVABLE] = 0;
 	arch_zone_highest_possible_pfn[ZONE_MOVABLE] = 0;

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 4.4 00/27] 4.4.43-stable review
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (25 preceding siblings ...)
  2017-01-13 11:38   ` [PATCH 4.4 27/27] mm/init: fix zone boundary creation Greg Kroah-Hartman
@ 2017-01-13 20:19   ` Guenter Roeck
  2017-01-14  7:24     ` Greg Kroah-Hartman
  2017-01-13 21:57   ` Shuah Khan
  27 siblings, 1 reply; 32+ messages in thread
From: Guenter Roeck @ 2017-01-13 20:19 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, shuah.kh, patches, ben.hutchings, stable

On Fri, Jan 13, 2017 at 12:38:17PM +0100, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.43 release.
> There are 27 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 Sun Jan 15 11:36:57 UTC 2017.
> Anything received after that time might be too late.
> 
Build results:
	total: 149 pass: 149 fail: 0
Qemu test results:
	total: 115 pass: 115 fail: 0

In case you wonder, the avr32 tests don't fail anymore because I disabled
CONFIG_NET for those builds, not because anything has been fixed. This lets us
at least build test the architecture code.

Details are available at http://kerneltests.org/builders.

Guenter

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 4.4 00/27] 4.4.43-stable review
  2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
                     ` (26 preceding siblings ...)
  2017-01-13 20:19   ` [PATCH 4.4 00/27] 4.4.43-stable review Guenter Roeck
@ 2017-01-13 21:57   ` Shuah Khan
  27 siblings, 0 replies; 32+ messages in thread
From: Shuah Khan @ 2017-01-13 21:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, patches, ben.hutchings, stable, Shuah Khan

On 01/13/2017 04:38 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.43 release.
> There are 27 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 Sun Jan 15 11:36:57 UTC 2017.
> 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.4.43-rc1.gz
> or in the git tree and branch at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h
> 

Compiled and booted on my test system. No dmesg regressions.

thanks,
-- Shuah


-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America(Silicon Valley)
shuah.kh@samsung.com

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 4.4 00/27] 4.4.43-stable review
  2017-01-13 20:19   ` [PATCH 4.4 00/27] 4.4.43-stable review Guenter Roeck
@ 2017-01-14  7:24     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-14  7:24 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: linux-kernel, torvalds, akpm, shuah.kh, patches, ben.hutchings, stable

On Fri, Jan 13, 2017 at 12:19:08PM -0800, Guenter Roeck wrote:
> On Fri, Jan 13, 2017 at 12:38:17PM +0100, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.4.43 release.
> > There are 27 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 Sun Jan 15 11:36:57 UTC 2017.
> > Anything received after that time might be too late.
> > 
> Build results:
> 	total: 149 pass: 149 fail: 0
> Qemu test results:
> 	total: 115 pass: 115 fail: 0
> 
> In case you wonder, the avr32 tests don't fail anymore because I disabled
> CONFIG_NET for those builds, not because anything has been fixed. This lets us
> at least build test the architecture code.

Ah, I was wondering, building the arch code is good.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 4.4 01/27] netvsc: reduce maximum GSO size
  2017-01-13 11:38   ` [PATCH 4.4 01/27] netvsc: reduce maximum GSO size Greg Kroah-Hartman
@ 2017-02-09 19:37     ` Ben Hutchings
  2017-02-10 21:15       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 32+ messages in thread
From: Ben Hutchings @ 2017-02-09 19:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: stable, Stephen Hemminger, David S. Miller

On Fri, 2017-01-13 at 12:38 +0100, Greg Kroah-Hartman wrote:
> 4.4-stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> From: stephen hemminger <stephen@networkplumber.org>
> 
> 
> [ Upstream commit a50af86dd49ee1851d1ccf06dd0019c05b95e297 ]
> 
> Hyper-V (and Azure) support using NVGRE which requires some extra space
> for encapsulation headers. Because of this the largest allowed TSO
> packet is reduced.
> 
> For older releases, hard code a fixed reduced value.  For next release,
> there is a better solution which uses result of host offload
> negotiation.
> 
> Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  drivers/net/hyperv/netvsc_drv.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> --- a/drivers/net/hyperv/netvsc_drv.c
> +++ b/drivers/net/hyperv/netvsc_drv.c
> @@ -40,6 +40,8 @@
>  
>  #include "hyperv_net.h"
>  
> +/* Restrict GSO size to account for NVGRE */
> +#define NETVSC_GSO_MAX_SIZE	62768
>  
>  #define RING_SIZE_MIN 64
>  static int ring_size = 128;
> @@ -852,6 +854,7 @@ static int netvsc_set_channels(struct ne
>  		}
>  		goto recover;
>  	}
> +	netif_set_gso_max_size(net, NETVSC_GSO_MAX_SIZE);
>  
>   out:
>  	netvsc_open(net);
> 

This has been wrongly backported.  Please apply the patch below.

Ben.

---
From: Ben Hutchings <ben@decadent.org.uk>
Date: Thu, 9 Feb 2017 19:32:08 +0000
Subject: [PATCH] netvsc: Set maximum GSO size in the right place

Commit a50af86dd49e "netvsc: reduce maximum GSO size" was wrongly
backported to 4.4-stable.  The maximum size needs to be set before the
net device is registered, in netvsc_probe().

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/net/hyperv/netvsc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 7a601d8c615e..e8a09ff9e724 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -854,7 +854,6 @@ static int netvsc_set_channels(struct net_device *net,
 		}
 		goto recover;
 	}
-	netif_set_gso_max_size(net, NETVSC_GSO_MAX_SIZE);
 
  out:
 	netvsc_open(net);
@@ -1142,6 +1141,7 @@ static int netvsc_probe(struct hv_device *dev,
 	nvdev = hv_get_drvdata(dev);
 	netif_set_real_num_tx_queues(net, nvdev->num_chn);
 	netif_set_real_num_rx_queues(net, nvdev->num_chn);
+	netif_set_gso_max_size(net, NETVSC_GSO_MAX_SIZE);
 
 	ret = register_netdev(net);
 	if (ret != 0) {

-- 
Ben Hutchings
All the simple programs have been written, and all the good names
taken.

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* Re: [PATCH 4.4 01/27] netvsc: reduce maximum GSO size
  2017-02-09 19:37     ` Ben Hutchings
@ 2017-02-10 21:15       ` Greg Kroah-Hartman
  0 siblings, 0 replies; 32+ messages in thread
From: Greg Kroah-Hartman @ 2017-02-10 21:15 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: linux-kernel, stable, Stephen Hemminger, David S. Miller

On Thu, Feb 09, 2017 at 07:37:35PM +0000, Ben Hutchings wrote:
> On Fri, 2017-01-13 at 12:38 +0100, Greg Kroah-Hartman wrote:
> > 4.4-stable review patch.  If anyone has any objections, please let me know.
> > 
> > ------------------
> > 
> > From: stephen hemminger <stephen@networkplumber.org>
> > 
> > 
> > [ Upstream commit a50af86dd49ee1851d1ccf06dd0019c05b95e297 ]
> > 
> > Hyper-V (and Azure) support using NVGRE which requires some extra space
> > for encapsulation headers. Because of this the largest allowed TSO
> > packet is reduced.
> > 
> > For older releases, hard code a fixed reduced value.  For next release,
> > there is a better solution which uses result of host offload
> > negotiation.
> > 
> > Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
> > Signed-off-by: David S. Miller <davem@davemloft.net>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > ---
> >  drivers/net/hyperv/netvsc_drv.c |    3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > --- a/drivers/net/hyperv/netvsc_drv.c
> > +++ b/drivers/net/hyperv/netvsc_drv.c
> > @@ -40,6 +40,8 @@
> >  
> >  #include "hyperv_net.h"
> >  
> > +/* Restrict GSO size to account for NVGRE */
> > +#define NETVSC_GSO_MAX_SIZE	62768
> >  
> >  #define RING_SIZE_MIN 64
> >  static int ring_size = 128;
> > @@ -852,6 +854,7 @@ static int netvsc_set_channels(struct ne
> >  		}
> >  		goto recover;
> >  	}
> > +	netif_set_gso_max_size(net, NETVSC_GSO_MAX_SIZE);
> >  
> >   out:
> >  	netvsc_open(net);
> > 
> 
> This has been wrongly backported.  Please apply the patch below.
> 
> Ben.

Many thanks for this, now applied.

greg k-h

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2017-02-10 21:15 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170113113908epcas2p26894f438616da1bf9f7b6b31f735fedc@epcas2p2.samsung.com>
2017-01-13 11:38 ` [PATCH 4.4 00/27] 4.4.43-stable review Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 01/27] netvsc: reduce maximum GSO size Greg Kroah-Hartman
2017-02-09 19:37     ` Ben Hutchings
2017-02-10 21:15       ` Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 02/27] ser_gigaset: return -ENOMEM on error instead of success Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 03/27] net: vrf: Drop conntrack data after pass through VRF device on Tx Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 04/27] ipv6: handle -EFAULT from skb_copy_bits Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 05/27] net, sched: fix soft lockup in tc_classify Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 06/27] net: stmmac: Fix race between stmmac_drv_probe and stmmac_open Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 07/27] net/mlx5: Check FW limitations on log_max_qp before setting it Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 08/27] net/mlx5: Avoid shadowing numa_node Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 09/27] drop_monitor: add missing call to genlmsg_end Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 10/27] drop_monitor: consider inserted data in genlmsg_end Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 11/27] igmp: Make igmp group member RFC 3376 compliant Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 12/27] ipv4: Do not allow MAIN to be alias for new LOCAL w/ custom rules Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 13/27] r8152: split rtl8152_suspend function Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 14/27] r8152: fix rx issue for runtime suspend Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 15/27] gro: Enter slow-path if there is no tailroom Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 16/27] gro: use min_t() in skb_gro_reset_offset() Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 17/27] gro: Disable frag0 optimization on IPv6 ext headers Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 18/27] net: ipv4: Fix multipath selection with vrf Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 19/27] net: vrf: do not allow table id 0 Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 20/27] HID: hid-cypress: validate length of report Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 21/27] ALSA: firewire-tascam: Fix to handle error from initialization of stream data Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 22/27] powerpc: Fix build warning on 32-bit PPC Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 23/27] ARM: zynq: Reserve correct amount of non-DMA RAM Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 24/27] ARM: OMAP4+: Fix bad fallthrough for cpuidle Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 26/27] ALSA: usb-audio: Add a quirk for Plantronics BT600 Greg Kroah-Hartman
2017-01-13 11:38   ` [PATCH 4.4 27/27] mm/init: fix zone boundary creation Greg Kroah-Hartman
2017-01-13 20:19   ` [PATCH 4.4 00/27] 4.4.43-stable review Guenter Roeck
2017-01-14  7:24     ` Greg Kroah-Hartman
2017-01-13 21:57   ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).