3.12.1-stable review
Greg Kroah-Hartman
maintainercover 3.12.1-stable review
This is the start of the stable review cycle for the 3.12.1 release. There are 19 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 Wed Nov 20 18:36:14 UTC 2013. 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/v3.0/stable-review/patch-3.12.1-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 3.12.1-rc1
Xenia Ragiadakou <[email protected]>
usbcore: set lpm_capable field for LPM capable root hubs
Johan Hovold <[email protected]>
backlight: atmel-pwm-bl: fix deferred probe from __init
Johan Hovold <[email protected]>
misc: atmel_pwm: add deferred-probing support
Steven Rostedt <[email protected]>
tracing: Fix potential out-of-bounds in trace_get_user()
Anssi Hannula <[email protected]>
ALSA: hda - hdmi: Fix reported channel map on common default layouts
Rui li <[email protected]>
USB: add new zte 3g-dongle's pid to option.c
Gerd Hoffmann <[email protected]>
hyperv-fb: add pci stub
Hannes Frederic Sowa <[email protected]>
ipv6: reset dst.expires value when clearing expire flag
Hannes Frederic Sowa <[email protected]>
ipv6: ip6_dst_check needs to check for expired dst_entries
Yuchung Cheng <[email protected]>
tcp: do not rearm RTO when future data are sacked
Yuchung Cheng <[email protected]>
tcp: only take RTT from timestamps if new data is acked
Yuchung Cheng <[email protected]>
tcp: fix SYNACK RTT estimation in Fast Open
Eric Dumazet <[email protected]>
tcp: gso: fix truesize tracking
Ben Hutchings <[email protected]>
cxgb3: Fix length calculation in write_ofld_wr() on 32-bit architectures
Wei Liu <[email protected]>
xen-netback: use jiffies_64 value to calculate credit timeout
Jason Wang <[email protected]>
virtio-net: correctly handle cpu hotplug notifier during resuming
Jason Wang <[email protected]>
net: flow_dissector: fail on evil iph->ihl
Daniel Borkmann <[email protected]>
net: sctp: do not trigger BUG_ON in sctp_cmd_delete_tcb
Jack Morgenstein <[email protected]>
net/mlx4_core: Fix call to __mlx4_unregister_mac
-------------
Diffstat:
Makefile | 4 ++-- drivers/misc/atmel_pwm.c | 6 +++-- drivers/net/ethernet/chelsio/cxgb3/sge.c | 3 ++- drivers/net/ethernet/mellanox/mlx4/cmd.c | 2 +- drivers/net/virtio_net.c | 13 +++++------ drivers/net/xen-netback/common.h | 1 + drivers/net/xen-netback/interface.c | 3 +-- drivers/net/xen-netback/netback.c | 10 ++++---- drivers/usb/core/hcd.c | 1 + drivers/usb/core/hub.c | 7 +++++- drivers/usb/core/usb.h | 1 + drivers/usb/serial/option.c | 17 ++++++++++++++ drivers/video/backlight/atmel-pwm-bl.c | 9 +++---- drivers/video/hyperv_fb.c | 40 +++++++++++++++++++++++++++++++- include/net/ip6_fib.h | 1 + kernel/trace/trace.c | 5 +++- net/core/flow_dissector.c | 2 +- net/ipv4/tcp_input.c | 34 ++++++++++++++++++++------- net/ipv4/tcp_offload.c | 13 ++++------- net/ipv6/route.c | 9 ++++--- net/sctp/sm_sideeffect.c | 1 - sound/pci/hda/patch_hdmi.c | 5 ++-- 22 files changed, 136 insertions(+), 51 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/19 net/mlx4_core: Fix call to __mlx4_unregister_mac
3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jack Morgenstein <[email protected]>
[ Upstream commit c32b7dfbb1dfb3f0a68f250deff65103c8bb704a ]
In function mlx4_master_deactivate_admin_state() __mlx4_unregister_mac was called using the MAC index. It should be called with the value of the MAC itself.
--- drivers/net/ethernet/mellanox/mlx4/cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx4/cmd.c +1 -1
@@ -1691,7 +1691,7 @@ static void mlx4_master_deactivate_admin vp_oper->vlan_idx =NO_INDX ; }if (NO_INDX != vp_oper->mac_idx) { -__mlx4_unregister_mac (&priv->dev, port, vp_oper->mac_idx); +__mlx4_unregister_mac (&priv->dev, port, vp_oper->state.mac); vp_oper->mac_idx =NO_INDX ; } }
Greg Kroah-Hartman
maintainerPATCH 2/19 net: sctp: do not trigger BUG_ON in sctp_cmd_delete_tcb
In reply to Greg Kroah-Hartman3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Borkmann <[email protected]>
[ Upstream commit 7926c1d5be0b7cbe5b8d5c788d7d39237e7b212c ]
Introduced in f9e42b853523 ("net: sctp: sideeffect: throw BUG if primary_path is NULL"), we intended to find a buggy assoc that's part of the assoc hash table with a primary_path that is NULL. However, we better remove the BUG_ON for now and find a more suitable place to assert for these things as Mark reports that this also triggers the bug when duplication cookie processing happens, and the assoc is not part of the hash table (so all good in this case). Such a situation can for example easily be reproduced by:
tc qdisc add dev eth0 root handle 1: prio bands 2 priomap 1 1 1 1 1 1 tc qdisc add dev eth0 parent 1:2 handle 20: netem loss 20% tc filter add dev eth0 protocol ip parent 1: prio 2 u32 match ip \
protocol 132 0xff match u8 0x0b 0xff at 32 flowid 1:2
This drops 20% of COOKIE-ACK packets. After some follow-up discussion with Vlad we came to the conclusion that for now we should still better remove this BUG_ON() assertion, and come up with two follow-ups later on, that is, i) find a more suitable place for this assertion, and possibly ii) have a special allocator/initializer for such kind of temporary assocs.
--- net/sctp/sm_sideeffect.c | 1 - 1 file changed, 1 deletion(-)
net/sctp/sm_sideeffect.c +0 -1
@@ -860,7 +860,6 @@ static void sctp_cmd_delete_tcb(sctp_cmd (!asoc->temp) && (sk->sk_shutdown != SHUTDOWN_MASK)) return; -BUG_ON (asoc->peer.primary_path ==NULL );sctp_unhash_established (asoc);sctp_association_free (asoc); }
Greg Kroah-Hartman
maintainerPATCH 3/19 net: flow_dissector: fail on evil iph->ihl
In reply to Greg Kroah-Hartman3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jason Wang <[email protected]>
[ Upstream commit 6f092343855a71e03b8d209815d8c45bf3a27fcd ]
We don't validate iph->ihl which may lead a dead loop if we meet a IPIP skb whose iph->ihl is zero. Fix this by failing immediately when iph->ihl is evil (less than 5).
This issue were introduced by commit ec5efe7946280d1e84603389a1030ccec0a767ae (rps: support IPIP encapsulation).
--- net/core/flow_dissector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/flow_dissector.c +1 -1
@@ -40,7 +40,7 @@ again:struct iphdr _iph; ip: iph =skb_header_pointer (skb, nhoff,sizeof (_iph), &_iph); -if (!iph) +if (!iph || iph->ihl <5 )return false;if (ip_is_fragment (iph))
Greg Kroah-Hartman
maintainerPATCH 4/19 virtio-net: correctly handle cpu hotplug notifier during resuming
In reply to Greg Kroah-Hartman3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jason Wang <[email protected]>
[ Upstream commit ec9debbd9a88d8ea86c488d6ffcac419ee7d46d9 ]
commit 3ab098df35f8b98b6553edc2e40234af512ba877 (virtio-net: don't respond to cpu hotplug notifier if we're not ready) tries to bypass the cpu hotplug notifier by checking the config_enable and does nothing is it was false. So it need to try to hold the config_lock mutex which may happen in atomic environment which leads the following warnings:
[ 622.944441] CPU0 attaching NULL sched-domain. [ 622.944446] CPU1 attaching NULL sched-domain. [ 622.944485] CPU0 attaching NULL sched-domain. [ 622.950795] BUG: sleeping function called from invalid context at kernel/mutex.c:616 [ 622.950796] in_atomic(): 1, irqs_disabled(): 1, pid: 10, name: migration/1 [ 622.950796] no locks held by migration/1/10. [ 622.950798] CPU: 1 PID: 10 Comm: migration/1 Not tainted 3.12.0-rc5-wl-01249-gb91e82d #317 [ 622.950799] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 622.950802] 0000000000000000 ffff88001d42dba0 ffffffff81a32f22 ffff88001bfb9c70 [ 622.950803] ffff88001d42dbb0 ffffffff810edb02 ffff88001d42dc38 ffffffff81a396ed [ 622.950805] 0000000000000046 ffff88001d42dbe8 ffffffff810e861d 0000000000000000 [ 622.950805] Call Trace: [ 622.950810] [<ffffffff81a32f22>] dump_stack+0x54/0x74 [ 622.950815] [<ffffffff810edb02>] __might_sleep+0x112/0x114 [ 622.950817] [<ffffffff81a396ed>] mutex_lock_nested+0x3c/0x3c6 [ 622.950818] [<ffffffff810e861d>] ? up+0x39/0x3e [ 622.950821] [<ffffffff8153ea7c>] ? acpi_os_signal_semaphore+0x21/0x2d [ 622.950824] [<ffffffff81565ed1>] ? acpi_ut_release_mutex+0x5e/0x62 [ 622.950828] [<ffffffff816d04ec>] virtnet_cpu_callback+0x33/0x87 [ 622.950830] [<ffffffff81a42576>] notifier_call_chain+0x3c/0x5e [ 622.950832] [<ffffffff810e86a8>] __raw_notifier_call_chain+0xe/0x10 [ 622.950835] [<ffffffff810c5556>] __cpu_notify+0x20/0x37 [ 622.950836] [<ffffffff810c5580>] cpu_notify+0x13/0x15 [ 622.950838] [<ffffffff81a237cd>] take_cpu_down+0x27/0x3a [ 622.950841] [<ffffffff81136289>] stop_machine_cpu_stop+0x93/0xf1 [ 622.950842] [<ffffffff81136167>] cpu_stopper_thread+0xa0/0x12f [ 622.950844] [<ffffffff811361f6>] ? cpu_stopper_thread+0x12f/0x12f [ 622.950847] [<ffffffff81119710>] ? lock_release_holdtime.part.7+0xa3/0xa8 [ 622.950848] [<ffffffff81135e4b>] ? cpu_stop_should_run+0x3f/0x47 [ 622.950850] [<ffffffff810ea9b0>] smpboot_thread_fn+0x1c5/0x1e3 [ 622.950852] [<ffffffff810ea7eb>] ? lg_global_unlock+0x67/0x67 [ 622.950854] [<ffffffff810e36b7>] kthread+0xd8/0xe0 [ 622.950857] [<ffffffff81a3bfad>] ? wait_for_common+0x12f/0x164 [ 622.950859] [<ffffffff810e35df>] ? kthread_create_on_node+0x124/0x124 [ 622.950861] [<ffffffff81a45ffc>] ret_from_fork+0x7c/0xb0 [ 622.950862] [<ffffffff810e35df>] ? kthread_create_on_node+0x124/0x124 [ 622.950876] smpboot: CPU 1 is now offline [ 623.194556] SMP alternatives: lockdep: fixing up alternatives [ 623.194559] smpboot: Booting Node 0 Processor 1 APIC 0x1
...
A correct fix is to unregister the hotcpu notifier during restore and register a new one in resume.
--- drivers/net/virtio_net.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
drivers/net/virtio_net.c +6 -7
@@ -1118,11 +1118,6 @@ static int virtnet_cpu_callback(struct n { struct virtnet_info *vi = container_of(nfb, struct virtnet_info, nb); -mutex_lock (&vi->config_lock); - -if (!vi->config_enable) - goto done; -switch (action & ~CPU_TASKS_FROZEN ) {case CPU_ONLINE :case CPU_DOWN_FAILED :
@@ -1136,8 +1131,6 @@ static int virtnet_cpu_callback(struct nbreak ; } -done: -mutex_unlock (&vi->config_lock);return NOTIFY_OK ; }
@@ -1699,6 +1692,8 @@ static int virtnet_freeze(struct virtio_struct virtnet_info *vi = vdev->priv;int i; +unregister_hotcpu_notifier (&vi->nb); +/* Prevent config work handler from accessing the device */ mutex_lock (&vi->config_lock); vi->config_enable = false;
@@ -1747,6 +1742,10 @@ static int virtnet_restore(struct virtiovirtnet_set_queues (vi, vi->curr_queue_pairs);rtnl_unlock (); + err =register_hotcpu_notifier (&vi->nb); +if (err) +return err; + return 0; }#endif
Greg Kroah-Hartman
maintainerPATCH 5/19 xen-netback: use jiffies_64 value to calculate credit timeout
In reply to Greg Kroah-Hartman3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wei Liu <[email protected]>
[ Upstream commit 059dfa6a93b779516321e5112db9d7621b1367ba ]
time_after_eq() only works if the delta is < MAX_ULONG/2.
For a 32bit Dom0, if netfront sends packets at a very low rate, the time between subsequent calls to tx_credit_exceeded() may exceed MAX_ULONG/2 and the test for timer_after_eq() will be incorrect. Credit will not be replenished and the guest may become unable to send packets (e.g., if prior to the long gap, all credit was exhausted).
Use jiffies_64 variant to mitigate this problem for 32bit Dom0.
--- drivers/net/xen-netback/common.h | 1 + drivers/net/xen-netback/interface.c | 3 +-- drivers/net/xen-netback/netback.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-)
drivers/net/xen-netback/common.h +1 -0
@@ -163,6 +163,7 @@ struct xenvif {unsigned long credit_usec;unsigned long remaining_credit;struct timer_list credit_timeout; +u64 credit_window_start;/* Statistics */ unsigned long rx_gso_checksum_fixup;
drivers/net/xen-netback/interface.c +1 -2
@@ -312,8 +312,7 @@ struct xenvif *xenvif_alloc(struct devic vif->credit_bytes = vif->remaining_credit = ~0UL ; vif->credit_usec =0UL ;init_timer (&vif->credit_timeout); -/* Initialize 'expires' now: it's used to track the credit window. */ - vif->credit_timeout.expires = jiffies; + vif->credit_window_start =get_jiffies_64 (); dev->netdev_ops = &xenvif_netdev_ops; dev->hw_features =NETIF_F_SG |NETIF_F_IP_CSUM |NETIF_F_TSO ;
drivers/net/xen-netback/netback.c +5 -5
@@ -1185,9 +1185,8 @@ out:static bool tx_credit_exceeded (struct xenvif *vif,unsigned size) { -unsigned long now = jiffies; -unsigned long next_credit = - vif->credit_timeout.expires + +u64 now =get_jiffies_64 (); +u64 next_credit = vif->credit_window_start +msecs_to_jiffies (vif->credit_usec /1000 );/* Timer could already be pending in rare cases. */
@@ -1195,8 +1194,8 @@ static bool tx_credit_exceeded(struct xereturn true;/* Passed the point where we can replenish credit? */ -if (time_after_eq (now, next_credit)) { - vif->credit_timeout.expires = now; +if (time_after_eq64 (now, next_credit)) { + vif->credit_window_start = now;tx_add_credit (vif); }
@@ -1208,6 +1207,7 @@ static bool tx_credit_exceeded(struct xe tx_credit_callback;mod_timer (&vif->credit_timeout, next_credit); + vif->credit_window_start = next_credit;return true; }
Greg Kroah-Hartman
maintainerPATCH 6/19 cxgb3: Fix length calculation in write_ofld_wr() on 32-bit architectures
In reply to Greg Kroah-Hartman3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Hutchings <[email protected]>
[ Upstream commit 262e827fe745642589450ae241b7afd3912c3f25 ]
The length calculation here is now invalid on 32-bit architectures, since sk_buff::tail is a pointer and sk_buff::transport_header is an integer offset:
drivers/net/ethernet/chelsio/cxgb3/sge.c: In function 'write_ofld_wr':drivers/net/ethernet/chelsio/cxgb3/sge.c:1603:9: warning: passing argument 4 of 'make_sgl' makes integer from pointer without a cast [enabled by default]
adap->pdev);
^
drivers/net/ethernet/chelsio/cxgb3/sge.c:964:28: note: expected 'unsigned int' but argument is of type 'sk_buff_data_t'
static inline unsigned int make_sgl(const struct sk_buff *skb,
^Use the appropriate skb accessor functions.
Compile-tested only.
--- drivers/net/ethernet/chelsio/cxgb3/sge.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/chelsio/cxgb3/sge.c +2 -1
@@ -1599,7 +1599,8 @@ static void write_ofld_wr(struct adapter flits =skb_transport_offset (skb) /8 ; sgp = ndesc ==1 ? (struct sg_ent *)&d->flit[flits] : sgl; sgl_flits =make_sgl (skb, sgp,skb_transport_header (skb), - skb->tail - skb->transport_header, +skb_tail_pointer (skb) - +skb_transport_header (skb), adap->pdev);if (need_skb_unmap ()) {setup_deferred_unmapping (skb, adap->pdev, sgp, sgl_flits);
Greg Kroah-Hartman
maintainerPATCH 7/19 tcp: gso: fix truesize tracking
In reply to Greg Kroah-Hartman3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit 0d08c42cf9a71530fef5ebcfe368f38f2dd0476f ]
commit 6ff50cd55545 ("tcp: gso: do not generate out of order packets") had an heuristic that can trigger a warning in skb_try_coalesce(), because skb->truesize of the gso segments were exactly set to mss.
This breaks the requirement that
skb->truesize >= skb->len + truesizeof(struct sk_buff);
It can trivially be reproduced by :
ifconfig lo mtu 1500
ethtool -K lo tso off
netperf
As the skbs are looped into the TCP networking stack, skb_try_coalesce() warns us of these skb under-estimating their truesize.
--- net/ipv4/tcp_offload.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
net/ipv4/tcp_offload.c +5 -8
@@ -18,6 +18,7 @@ struct sk_buff *tcp_tso_segment(struct s netdev_features_t features) {struct sk_buff *segs =ERR_PTR (-EINVAL ); +unsigned int sum_truesize =0 ;struct tcphdr *th;unsigned int thlen;unsigned int seq;
@@ -102,13 +103,7 @@ struct sk_buff *tcp_tso_segment(struct sif (copy_destructor) { skb->destructor = gso_skb->destructor; skb->sk = gso_skb->sk; -/* {tcp|sock}_wfree() use exact truesize accounting : -* sum(skb->truesize) MUST be exactly be gso_skb->truesize -* So we account mss bytes of 'true size' for each segment. -* The last segment will contain the remaining. -*/ - skb->truesize = mss; - gso_skb->truesize -= mss; + sum_truesize += skb->truesize; } skb = skb->next; th =tcp_hdr (skb);
@@ -125,7 +120,9 @@ struct sk_buff *tcp_tso_segment(struct sif (copy_destructor) {swap (gso_skb->sk, skb->sk);swap (gso_skb->destructor, skb->destructor); -swap (gso_skb->truesize, skb->truesize); + sum_truesize += skb->truesize; +atomic_add (sum_truesize - gso_skb->truesize, + &skb->sk->sk_wmem_alloc); } delta = htonl(oldlen + (skb_tail_pointer(skb) -
Greg Kroah-Hartman
maintainerPATCH 8/19 tcp: fix SYNACK RTT estimation in Fast Open
In reply to Greg Kroah-Hartman3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yuchung Cheng <[email protected]>
[ Upstream commit bc15afa39ecc16f01c3389d15d8f6015a427fe85 ]
tp->lsndtime may not always be the SYNACK timestamp if a passive Fast Open socket sends data before handshake completes. And if the remote acknowledges both the data and the SYNACK, the RTT sample is already taken in tcp_ack(), so no need to call tcp_update_ack_rtt() in tcp_synack_rtt_meas() aagain.
--- net/ipv4/tcp_input.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)
net/ipv4/tcp_input.c +13 -5
@@ -2871,14 +2871,19 @@ static inline bool tcp_ack_update_rtt(st }/* Compute time elapsed between (last) SYNACK and the ACK completing 3WHS. */ -static void tcp_synack_rtt_meas (struct sock *sk,struct request_sock *req) +static void tcp_synack_rtt_meas (struct sock *sk,const u32 synack_stamp) {struct tcp_sock *tp =tcp_sk (sk);s32 seq_rtt =-1 ; -if (tp->lsndtime && !tp->total_retrans) - seq_rtt = tcp_time_stamp - tp->lsndtime; -tcp_ack_update_rtt (sk,FLAG_SYN_ACKED , seq_rtt,-1 ); +if (synack_stamp && !tp->total_retrans) + seq_rtt = tcp_time_stamp - synack_stamp; + +/* If the ACK acks both the SYNACK and the (Fast Open'd) data packets +* sent in SYN_RECV, SYNACK RTT is the smooth RTT computed in tcp_ack() +*/ +if (!tp->srtt) +tcp_ack_update_rtt (sk,FLAG_SYN_ACKED , seq_rtt,-1 ); }static void tcp_cong_avoid (struct sock *sk,u32 ack,u32 in_flight)
@@ -5587,6 +5592,7 @@ int tcp_rcv_state_process(struct sock *sstruct request_sock *req;int queued =0 ;bool acceptable; +u32 synack_stamp; tp->rx_opt.saw_tstamp =0 ;
@@ -5669,9 +5675,11 @@ int tcp_rcv_state_process(struct sock *s* so release it. */ if (req) { + synack_stamp =tcp_rsk (req)->snt_synack; tp->total_retrans = req->num_retrans;reqsk_fastopen_remove (sk, req, false); }else { + synack_stamp = tp->lsndtime;/* Make sure socket is routed, for correct metrics. */ icsk->icsk_af_ops->rebuild_header (sk);tcp_init_congestion_control (sk);
@@ -5694,7 +5702,7 @@ int tcp_rcv_state_process(struct sock *s tp->snd_una =TCP_SKB_CB (skb)->ack_seq; tp->snd_wnd =ntohs (th->window) << tp->rx_opt.snd_wscale;tcp_init_wl (tp,TCP_SKB_CB (skb)->seq); -tcp_synack_rtt_meas (sk, req); +tcp_synack_rtt_meas (sk, synack_stamp);if (tp->rx_opt.tstamp_ok) tp->advmss -=TCPOLEN_TSTAMP_ALIGNED ;
Greg Kroah-Hartman
maintainerPATCH 9/19 tcp: only take RTT from timestamps if new data is acked
In reply to Greg Kroah-Hartman3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yuchung Cheng <[email protected]>
[ Upstream commit 2909d874f34eae157aecab0af27c6dc4a1751f8f ]
Patch ed08495c3 "tcp: use RTT from SACK for RTO" has a bug that it does not check if the ACK acknowledge new data before taking the RTT sample from TCP timestamps. This patch adds the check back as required by the RFC.
--- net/ipv4/tcp_input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/ipv4/tcp_input.c +2 -1
@@ -2856,7 +2856,8 @@ static inline bool tcp_ack_update_rtt(st* left edge of the send window. * See draft-ietf-tcplw-high-performance-00, section 3.3. */ -if (seq_rtt <0 && tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr) +if (seq_rtt <0 && tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr && + flag &FLAG_ACKED ) seq_rtt = tcp_time_stamp - tp->rx_opt.rcv_tsecr;if (seq_rtt <0 )
Greg Kroah-Hartman
maintainerPATCH 10/19 tcp: do not rearm RTO when future data are sacked
In reply to Greg Kroah-Hartman3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yuchung Cheng <[email protected]>
[ Upstream commit 2f715c1dde6e1760f3101358dc26f8c9489be0bf ]
Patch ed08495c3 "tcp: use RTT from SACK for RTO" always re-arms RTO upon obtaining a RTT sample from newly sacked data.
But technically RTO should only be re-armed when the data sent before the last (re)transmission of write queue head are (s)acked. Otherwise the RTO may continue to extend during loss recovery on data sent in the future.
Note that RTTs from ACK or timestamps do not have this problem, as the RTT source must be from data sent before.
The new RTO re-arm policy is
1) Always re-arm RTO if SND.UNA is advanced
2) Re-arm RTO if sack RTT is available, provided the sacked data was sent before the last time write_queue_head was sent.
--- net/ipv4/tcp_input.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
net/ipv4/tcp_input.c +10 -3
@@ -2987,6 +2987,7 @@ static int tcp_clean_rtx_queue(struct sos32 seq_rtt =-1 ;s32 ca_seq_rtt =-1 ;ktime_t last_ackt =net_invalid_timestamp (); +bool rtt_update;while ((skb =tcp_write_queue_head (sk)) && skb !=tcp_send_head (sk)) {struct tcp_skb_cb *scb =TCP_SKB_CB (skb);
@@ -3063,14 +3064,13 @@ static int tcp_clean_rtx_queue(struct soif (skb && (TCP_SKB_CB (skb)->sacked &TCPCB_SACKED_ACKED )) flag |=FLAG_SACK_RENEGING ; -if (tcp_ack_update_rtt (sk, flag, seq_rtt, sack_rtt) || - (flag &FLAG_ACKED )) -tcp_rearm_rto (sk); + rtt_update =tcp_ack_update_rtt (sk, flag, seq_rtt, sack_rtt);if (flag &FLAG_ACKED ) {const struct tcp_congestion_ops *ca_ops =inet_csk (sk)->icsk_ca_ops; +tcp_rearm_rto (sk);if (unlikely (icsk->icsk_mtup.probe_size && !after (tp->mtu_probe.probe_seq_end, tp->snd_una))) {tcp_mtup_probe_success (sk);
@@ -3109,6 +3109,13 @@ static int tcp_clean_rtx_queue(struct so ca_ops->pkts_acked (sk, pkts_acked, rtt_us); } + }else if (skb && rtt_update && sack_rtt >=0 && + sack_rtt > (s32)(now -TCP_SKB_CB (skb)->when)) { +/* Do not re-arm RTO if the sack RTT is measured from data sent +* after when the head was last (re)transmitted. Otherwise the +* timeout may continue to extend in loss recovery. +*/ +tcp_rearm_rto (sk); }#if FASTRETRANS_DEBUG >0
Greg Kroah-Hartman
maintainerPATCH 11/19 ipv6: ip6_dst_check needs to check for expired dst_entries
In reply to Greg Kroah-Hartman3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hannes Frederic Sowa <[email protected]>
[ Upstream commit e3bc10bd95d7fcc3f2ac690c6ff22833ea6781d6 ]
On receiving a packet too big icmp error we check if our current cached dst_entry in the socket is still valid. This validation check did not care about the expiration of the (cached) route.
The error path I traced down:
The socket receives a packet too big mtu notification. It still has a valid dst_entry and thus issues the ip6_rt_pmtu_update on this dst_entry, setting RTF_EXPIRE and updates the dst.expiration value (which could fail because of not up-to-date expiration values, see previous patch).
In some seldom cases we race with a) the ip6_fib gc or b) another routing lookup which would result in a recreation of the cached rt6_info from its parent non-cached rt6_info. While copying the rt6_info we reinitialize the metrics store by copying it over from the parent thus invalidating the just installed pmtu update (both dsts use the same key to the inetpeer storage). The dst_entry with the just invalidated metrics data would just get its RTF_EXPIRES flag cleared and would continue to stay valid for the socket.
We should have not issued the pmtu update on the already expired dst_entry in the first placed. By checking the expiration on the dst entry and doing a relookup in case it is out of date we close the race because we would install a new rt6_info into the fib before we issue the pmtu update, thus closing this race.
Not reliably updating the dst.expire value was fixed by the patch "ipv6:
reset dst.expires value when clearing expire flag".
--- net/ipv6/route.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
net/ipv6/route.c +6 -3
@@ -1087,10 +1087,13 @@ static struct dst_entry *ip6_dst_check(sif (rt->rt6i_genid !=rt_genid_ipv6 (dev_net (rt->dst.dev)))return NULL ; -if (rt->rt6i_node && (rt->rt6i_node->fn_sernum == cookie)) -return dst; +if (!rt->rt6i_node || (rt->rt6i_node->fn_sernum != cookie)) +return NULL ; + +if (rt6_check_expired (rt)) +return NULL ; -return NULL ; +return dst; }static struct dst_entry *ip6_negative_advice (struct dst_entry *dst)
Greg Kroah-Hartman
maintainerPATCH 12/19 ipv6: reset dst.expires value when clearing expire flag
In reply to Greg Kroah-Hartman3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hannes Frederic Sowa <[email protected]>
[ Upstream commit 01ba16d6ec85a1ec4669c75513a76b61ec53ee50 ]
On receiving a packet too big icmp error we update the expire value by calling rt6_update_expires. This function uses dst_set_expires which is implemented that it can only reduce the expiration value of the dst entry.
If we insert new routing non-expiry information into the ipv6 fib where we already have a matching rt6_info we only clear the RTF_EXPIRES flag in rt6i_flags and leave the dst.expires value as is.
When new mtu information arrives for that cached dst_entry we again call dst_set_expires. This time it won't update the dst.expire value because we left the dst.expire value intact from the last update. So dst_set_expires won't touch dst.expires.
Fix this by resetting dst.expires when clearing the RTF_EXPIRE flag. dst_set_expires checks for a zero expiration and updates the dst.expires.
In the past this (not updating dst.expires) was necessary because dst.expire was placed in a union with the dst_entry *from reference and rt6_clean_expires did assign NULL to it. This split happend in ecd9883724b78cc72ed92c98bcb1a46c764fff21 ("ipv6: fix race condition regarding dst->expires and dst->from").
--- include/net/ip6_fib.h | 1 + 1 file changed, 1 insertion(+)
include/net/ip6_fib.h +1 -0
@@ -165,6 +165,7 @@ static inline struct inet6_dev *ip6_dst_static inline void rt6_clean_expires (struct rt6_info *rt) { rt->rt6i_flags &= ~RTF_EXPIRES ; + rt->dst.expires =0 ; }static inline void rt6_set_expires (struct rt6_info *rt,unsigned long expires)
Greg Kroah-Hartman
maintainerPATCH 13/19 hyperv-fb: add pci stub
In reply to Greg Kroah-Hartman3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gerd Hoffmann <[email protected]>
commit 7ad9684721606efbfb9b347346816e1e6baff8bb upstream.
This patch adds a pci stub driver to hyper-fb. The hyperv framebuffer driver will bind to the pci device then, so linux kernel and userspace know there is a proper kernel driver for the device active. lspci shows this for example:
[root@dhcp231 ~]# lspci -vs8
00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA (prog-if 00 [VGA controller])
Flags: bus master, fast devsel, latency 0, IRQ 11 Memory at f8000000 (32-bit, non-prefetchable) [size=64M] Expansion ROM at <unassigned> [disabled]
Kernel driver in use: hyperv_fb
Another effect is that the xorg vesa driver will not attach to the device and thus the Xorg server will automatically use the fbdev driver instead.
--- drivers/video/hyperv_fb.c | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-)
drivers/video/hyperv_fb.c +39 -1
@@ -795,12 +795,21 @@ static int hvfb_remove(struct hv_device } +static DEFINE_PCI_DEVICE_TABLE (pci_stub_id_table) = { + { + .vendor =PCI_VENDOR_ID_MICROSOFT , + .device =PCI_DEVICE_ID_HYPERV_VIDEO , + }, + {/* end of list */ } +}; +static const struct hv_vmbus_device_id id_table[] = {/* Synthetic Video Device GUID */ {HV_SYNTHVID_GUID }, {} }; +MODULE_DEVICE_TABLE (pci, pci_stub_id_table);MODULE_DEVICE_TABLE (vmbus, id_table);static struct hv_driver hvfb_drv = {
@@ -810,14 +819,43 @@ static struct hv_driver hvfb_drv = { .remove = hvfb_remove, }; +static int hvfb_pci_stub_probe (struct pci_dev *pdev, +const struct pci_device_id *ent) +{ +return 0 ; +} + +static void hvfb_pci_stub_remove (struct pci_dev *pdev) +{ +} + +static struct pci_driver hvfb_pci_stub_driver = { + .name =KBUILD_MODNAME , + .id_table = pci_stub_id_table, + .probe = hvfb_pci_stub_probe, + .remove = hvfb_pci_stub_remove, +};static int __init hvfb_drv_init (void ) { -return vmbus_driver_register (&hvfb_drv); +int ret; + + ret =vmbus_driver_register (&hvfb_drv); +if (ret !=0 ) +return ret; + + ret =pci_register_driver (&hvfb_pci_stub_driver); +if (ret !=0 ) { +vmbus_driver_unregister (&hvfb_drv); +return ret; + } + +return 0 ; } static void __exit hvfb_drv_exit(void) { +pci_unregister_driver (&hvfb_pci_stub_driver);vmbus_driver_unregister (&hvfb_drv); }
Greg Kroah-Hartman
maintainerPATCH 14/19 USB: add new zte 3g-dongles pid to option.c
In reply to Greg Kroah-Hartman3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rui li <[email protected]>
commit 0636fc507a976cdc40f21bdbcce6f0b98ff1dfe9 upstream.
--- drivers/usb/serial/option.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
drivers/usb/serial/option.c +17 -0
@@ -1376,6 +1376,23 @@ static const struct usb_device_id option .driver_info = (kernel_ulong_t)&net_intf2_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1426, 0xff, 0xff, 0xff), /* ZTE MF91 */ .driver_info = (kernel_ulong_t)&net_intf2_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1533, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1534, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1535, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1545, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1546, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1547, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1565, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1566, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1567, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1589, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1590, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1591, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1592, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1594, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1596, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1598, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1600, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_k3765_z_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) },
Greg Kroah-Hartman
maintainerPATCH 15/19 ALSA: hda - hdmi: Fix reported channel map on common default layouts
In reply to Greg Kroah-Hartman3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Anssi Hannula <[email protected]>
commit 56cac413dd6d43af8355f5d1f90a199b540f73fc upstream.
hdmi_setup_fake_chmap() is supposed to set the reported channel map when the channel map is not specified by the user.
However, the function indexes channel_allocations[] with a wrong value and extracts the wrong nibble from hdmi_channel_mapping[], causing wrong channel maps to be shown.
Fix those issues.
Tested on Intel HDMI to correctly generate various channel maps, for example 3,4,14,15,7,8,5,6 (instead of incorrect 3,4,8,7,5,6,14,0) for standard 7.1 channel audio. (Note that the side and rear channels are reported as RL/RR and RLC/RRC, respectively, as per the CEA-861 standard, instead of the more traditional SL/SR and RL/RR.)
Note that this only fixes the layouts that only contain traditional 7.1 speakers (2.0, 2.1, 4.0, 5.1, 7.1, etc.). E.g. the rear center of 6.1 is still being shown wrongly due to an issue with from_cea_slot() which will be fixed in a later patch.
--- sound/pci/hda/patch_hdmi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
sound/pci/hda/patch_hdmi.c +3 -2
@@ -740,9 +740,10 @@ static int hdmi_manual_setup_channel_mapstatic void hdmi_setup_fake_chmap (unsigned char *map,int ca) {int i; +int ordered_ca =get_channel_allocation_order (ca);for (i =0 ; i <8 ; i++) { -if (i < channel_allocations[ca].channels) - map[i] =from_cea_slot ((hdmi_channel_mapping[ca][i] >>4 ) &0x0f ); +if (i < channel_allocations[ordered_ca].channels) + map[i] =from_cea_slot (hdmi_channel_mapping[ca][i] &0x0f );else map[i] =0 ; }
Greg Kroah-Hartman
maintainerPATCH 16/19 tracing: Fix potential out-of-bounds in trace_get_user()
In reply to Greg Kroah-Hartman3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Steven Rostedt <[email protected]>
commit 057db8488b53d5e4faa0cedb2f39d4ae75dfbdbb upstream.
Andrey reported the following report:
ERROR: AddressSanitizer: heap-buffer-overflow on address ffff8800359c99f3 ffff8800359c99f3 is located 0 bytes to the right of 243-byte region [ffff8800359c9900, ffff8800359c99f3) Accessed by thread T13003:
#0 ffffffff810dd2da (asan_report_error+0x32a/0x440)
#1 ffffffff810dc6b0 (asan_check_region+0x30/0x40)
#2 ffffffff810dd4d3 (__tsan_write1+0x13/0x20)
#3 ffffffff811cd19e (ftrace_regex_release+0x1be/0x260)
#4 ffffffff812a1065 (__fput+0x155/0x360)
#5 ffffffff812a12de (____fput+0x1e/0x30)
#6 ffffffff8111708d (task_work_run+0x10d/0x140)
#7 ffffffff810ea043 (do_exit+0x433/0x11f0)
#8 ffffffff810eaee4 (do_group_exit+0x84/0x130)
#9 ffffffff810eafb1 (SyS_exit_group+0x21/0x30)
#10 ffffffff81928782 (system_call_fastpath+0x16/0x1b)
Allocated by thread T5167:
#0 ffffffff810dc778 (asan_slab_alloc+0x48/0xc0) #1 ffffffff8128337c (__kmalloc+0xbc/0x500) #2 ffffffff811d9d54 (trace_parser_get_init+0x34/0x90) #3 ffffffff811cd7b3 (ftrace_regex_open+0x83/0x2e0) #4 ffffffff811cda7d (ftrace_filter_open+0x2d/0x40) #5 ffffffff8129b4ff (do_dentry_open+0x32f/0x430) #6 ffffffff8129b668 (finish_open+0x68/0xa0) #7 ffffffff812b66ac (do_last+0xb8c/0x1710) #8 ffffffff812b7350 (path_openat+0x120/0xb50) #9 ffffffff812b8884 (do_filp_open+0x54/0xb0) #10 ffffffff8129d36c (do_sys_open+0x1ac/0x2c0) #11 ffffffff8129d4b7 (SyS_open+0x37/0x50) #12 ffffffff81928782 (system_call_fastpath+0x16/0x1b)
Shadow bytes around the buggy address:
ffff8800359c9700: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
ffff8800359c9780: fd fd fd fd fd fd fd fd fa fa fa fa fa fa fa fa
ffff8800359c9800: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
ffff8800359c9880: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
ffff8800359c9900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>ffff8800359c9980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00[03]fb
ffff8800359c9a00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
ffff8800359c9a80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
ffff8800359c9b00: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
ffff8800359c9b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8800359c9c00: 00 00 00 00 00 00 00 00 fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap redzone: fa Heap kmalloc redzone: fb Freed heap region: fd Shadow gap: fe
The out-of-bounds access happens on 'parser->buffer[parser->idx] = 0;'
Although the crash happened in ftrace_regex_open() the real bug occurred in trace_get_user() where there's an incrementation to parser->idx without a check against the size. The way it is triggered is if userspace sends in 128 characters (EVENT_BUF_SIZE + 1), the loop that reads the last character stores it and then breaks out because there is no more characters. Then the last character is read to determine what to do next, and the index is incremented without checking size.
Then the caller of trace_get_user() usually nulls out the last character with a zero, but since the index is equal to the size, it writes a nul character after the allocated space, which can corrupt memory.
Luckily, only root user has write access to this file.
--- kernel/trace/trace.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
kernel/trace/trace.c +4 -1
@@ -843,9 +843,12 @@ int trace_get_user(struct trace_parser *if (isspace (ch)) { parser->buffer[parser->idx] =0 ; parser->cont = false; - }else { + }else if (parser->idx < parser->size -1 ) { parser->cont = true; parser->buffer[parser->idx++] = ch; + }else { + ret = -EINVAL ; + goto out; } *ppos += read;
Greg Kroah-Hartman
maintainerPATCH 17/19 misc: atmel_pwm: add deferred-probing support
In reply to Greg Kroah-Hartman3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 5c6d6fd1564138ad048564e48639f842714a90c6 upstream.
Two drivers (atmel-pwm-bl and leds-atmel-pwm) currently depend on the atmel_pwm driver to have bound to any pwm-device before their devices are probed.
Support deferred probing of such devices by making sure to return -EPROBE_DEFER from pwm_channel_alloc when no pwm-device has yet been bound.
--- drivers/misc/atmel_pwm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/misc/atmel_pwm.c +4 -2
@@ -90,8 +90,10 @@ int pwm_channel_alloc(int index, structunsigned long flags;int status =0 ; -/* insist on PWM init, with this signal pinned out */ -if (!pwm || !(pwm->mask &1 << index)) +if (!pwm) +return -EPROBE_DEFER ; + +if (!(pwm->mask &1 << index))return -ENODEV ;if (index <0 || index >=PWM_NCHAN || !ch)
Greg Kroah-Hartman
maintainerPATCH 18/19 backlight: atmel-pwm-bl: fix deferred probe from __init
In reply to Greg Kroah-Hartman3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 9d3fde86b15303decea632c929fbf1f3ae4501f2 upstream.
Move probe out of __init section and don't use platform_driver_probe which cannot be used with deferred probing.
Since commit e9354576 ("gpiolib: Defer failed gpio requests by default") this driver might return -EPROBE_DEFER if a gpio_request fails.
--- drivers/video/backlight/atmel-pwm-bl.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/video/backlight/atmel-pwm-bl.c +5 -4
@@ -118,7 +118,7 @@ static const struct backlight_ops atmel_ .update_status = atmel_pwm_bl_set_intensity, }; -static int __init atmel_pwm_bl_probe (struct platform_device *pdev) +static int atmel_pwm_bl_probe (struct platform_device *pdev) {struct backlight_properties props;const struct atmel_pwm_bl_platform_data *pdata;
@@ -202,7 +202,7 @@ err_free_mem:return retval; } -static int __exit atmel_pwm_bl_remove(struct platform_device *pdev) +static int atmel_pwm_bl_remove (struct platform_device *pdev) {struct atmel_pwm_bl *pwmbl =platform_get_drvdata (pdev);
@@ -220,10 +220,11 @@ static struct platform_driver atmel_pwm_ .name = "atmel-pwm-bl", }, /* REVISIT add suspend() and resume() */ - .remove = __exit_p(atmel_pwm_bl_remove), + .probe = atmel_pwm_bl_probe, + .remove = atmel_pwm_bl_remove, }; -module_platform_driver_probe (atmel_pwm_bl_driver, atmel_pwm_bl_probe); +module_platform_driver (atmel_pwm_bl_driver);MODULE_AUTHOR ("Hans-Christian egtvedt <[email protected]>" );MODULE_DESCRIPTION ("Atmel PWM backlight driver" );
Greg Kroah-Hartman
maintainerPATCH 19/19 usbcore: set lpm_capable field for LPM capable root hubs
In reply to Greg Kroah-Hartman3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xenia Ragiadakou <[email protected]>
commit 9df89d85b407690afa46ddfbccc80bec6869971d upstream.
This patch sets the lpm_capable field for root hubs with LPM capabilities.
--- drivers/usb/core/hcd.c | 1 + drivers/usb/core/hub.c | 7 ++++++- drivers/usb/core/usb.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-)
drivers/usb/core/hcd.c +1 -0
@@ -1033,6 +1033,7 @@ static int register_root_hub(struct usb_ dev_name(&usb_dev->dev), retval);return retval; } + usb_dev->lpm_capable =usb_device_supports_lpm (usb_dev); } retval =usb_new_device (usb_dev);
drivers/usb/core/hub.c +6 -1
@@ -135,7 +135,7 @@ struct usb_hub *usb_hub_to_struct_hub(streturn usb_get_intfdata (hdev->actconfig->interface[0 ]); } -static int usb_device_supports_lpm (struct usb_device *udev) +int usb_device_supports_lpm (struct usb_device *udev) {/* USB 2.1 (and greater) devices indicate LPM support through * their USB 2.0 Extended Capabilities BOS descriptor.
@@ -156,6 +156,11 @@ static int usb_device_supports_lpm(struc "Power management will be impacted.\n");return 0 ; } + +/* udev is root hub */ +if (!udev->parent) +return 1 ; +if (udev->parent->lpm_capable)return 1 ;
drivers/usb/core/usb.h +1 -0
@@ -35,6 +35,7 @@ extern int usb_get_device_descriptor(str unsigned int size);extern int usb_get_bos_descriptor (struct usb_device *dev);extern void usb_release_bos_descriptor (struct usb_device *dev); +extern int usb_device_supports_lpm (struct usb_device *udev);extern char *usb_cache_string (struct usb_device *udev,int index);extern int usb_set_configuration (struct usb_device *dev,int configuration);extern int usb_choose_configuration (struct usb_device *udev);
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.12.1 release. There are 19 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.
Quoted 7 lines
Responses should be made by Wed Nov 20 18:36:14 UTC 2013. 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/v3.0/stable-review/patch-3.12.1-rc1.gzand the diffstat can be found below.
Build test results:
total: 110 pass: 107 skipped: 3 fail: 0
qemu tests all passed.
Results match those seen with the previous release and are as expected.
Guenter
At Mon, 18 Nov 2013 10:37:13 -0800,
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.12.1 release. There are 19 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 Wed Nov 20 18:36:14 UTC 2013. Anything received after that time might be too late.
This kernel can be built and boot without any problem. Building a kernel with this kernel also works fine.
- Build Machine: debian jessy x86_64
CPU: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz x 4
memory: 8GB
- Test machine: debian jessy x86_64(KVM guest on the Build Machine)
vCPU: x2
memory: 2GB
Thanks,
Satoru
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.12.1 release. There are 19 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 Wed Nov 20 18:36:14 UTC 2013. Anything received after that time might be too late.
Quoted 8 lines
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.12.1-rc1.gzand the diffstat can be found below.
thanks,
greg k-h
3.12.1:
patches applied cleanly
Compile test - passed
Boot tests - passed
dmesg regression tests - passed
[dmesgs look good. No regressions compared to the previous dmesgs for this release. dmesg emerg, crit, alert, err are clean. No regressions in warn.]
Cross-compile testing - limited tests passed (alpha, arm, arm64, blackfin, c6x, powerpc, sh, sparc, tile)
Test systems:
Samsung Series 9 900X4C Intel Corei5 (3.4 and later)
HP ProBook 6475b AMD A10-4600M APU with Radeon(tm) HD Graphics HP Compaq dc7700 SFF desktop: x86-64 Intel Core-i2 (cross-compile testing)
-- Shuah
Signature · 4 lines
Shuah Khan Senior Linux Kernel Developer - Open Source Group Samsung Research America(Silicon Valley) [email protected] | (970) 672-0658
Re: [PATCH 3.12 07/19] tcp: gso: fix truesize tracking
In reply to Greg Kroah-HartmanQuoted 11 lines · Greg Kroah-Hartman
3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit
0d08c42cf9a71530fef5ebcfe368f38f2dd0476f]commit
6ff50cd55545("tcp: gso: do not generate out of order packets") had an heuristic that can trigger a warning inskb_try_coalesce(), becauseskb->truesizeof the gso segments were exactly set to mss.
[...]
That commit went in 3.10, but this fix hasn't been applied to 3.10.y.
David, this code moved from net/ipv4/tcp.c to tcp_offload.c after 3.10 and this patch applies textually after adjusting the filename. Please consider including it in the next batch of stable fixes for 3.10.
Ben.
Signature · 3 lines
Ben Hutchings
Usenet is essentially a HUGE group of people passing notes in class.
- Rachel Kadel, `A Quick Guide to Newsgroup Etiquette'Re: [PATCH 3.12 07/19] tcp: gso: fix truesize tracking
From: Ben Hutchings <[email protected]>
Date: Thu, 28 Nov 2013 05:25:17 +0000
Quoted 12 lines · Greg Kroah-Hartman
Quoted 11 lines
3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit
0d08c42cf9a71530fef5ebcfe368f38f2dd0476f]commit
6ff50cd55545("tcp: gso: do not generate out of order packets") had an heuristic that can trigger a warning inskb_try_coalesce(), becauseskb->truesizeof the gso segments were exactly set to mss.
Quoted 7 lines
[...]
That commit went in 3.10, but this fix hasn't been applied to 3.10.y.
David, this code moved from
net/ipv4/tcp.ctotcp_offload.cafter 3.10 and this patch applies textually after adjusting the filename. Please consider including it in the next batch of stable fixes for 3.10.
Ok, integrating this one right now, thanks.