3.10.18-stable review
Greg Kroah-Hartman
maintainercover 3.10.18-stable review
This is the start of the stable review cycle for the 3.10.18 release. There are 54 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 Nov 3 22:00:53 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.10.18-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 3.10.18-rc1
Enrico Mioso <[email protected]>
usb: serial: option: blacklist Olivetti Olicard200
Greg Kroah-Hartman <[email protected]>
USB: serial: option: add support for Inovia SEW858 device
Diego Elio Pettenò <[email protected]>
USB: serial: ti_usb_3410_5052: add Abbott strip port ID to combined table as well.
Roel Kluin <[email protected]>
serial: vt8500: add missing braces
Johannes Berg <[email protected]>
wireless: radiotap: fix parsing buffer overrun
Fengguang Wu <[email protected]>
writeback: fix negative bdi max pause
David Henningsson <[email protected]>
ALSA: hda - Fix inverted internal mic not indicated on some machines
Takashi Iwai <[email protected]>
ALSA: us122l: Fix pcm_usb_stream mmapping regression
Hugh Dickins <[email protected]>
mm: fix BUG in __split_huge_page_pmd
James Ralston <[email protected]>
i2c: ismt: initialize DMA buffer
Mikulas Patocka <[email protected]>
dm snapshot: fix data corruption
Mika Westerberg <[email protected]>
gpio/lynxpoint: check if the interrupt is enabled in IRQ handler
Linus Walleij <[email protected]>
ARM: integrator: deactivate timer0 on the Integrator/CP
AKASHI Takahiro <[email protected]>
ARM: 7851/1: check for number of arguments in syscall_get/set_arguments()
Mariusz Ceier <[email protected]>
davinci_emac.c: Fix IFF_ALLMULTI setup
Hannes Frederic Sowa <[email protected]>
ipv6: probe routes asynchronous in rt6_probe
Julian Anastasov <[email protected]>
netfilter: nf_conntrack: fix rt6i_gateway checks for H.323 helper
Julian Anastasov <[email protected]>
ipv6: fill rt6i_gateway with nexthop address
Julian Anastasov <[email protected]>
ipv6: always prefer rt6i_gateway if present
Hannes Frederic Sowa <[email protected]>
inet: fix possible memory corruption with UDP_CORK and UFO
Seif Mazareeb <[email protected]>
net: fix cipso packet validation when !NETLABEL
Daniel Borkmann <[email protected]>
net: unix: inherit SOCK_PASS{CRED, SEC} flags from socket to fix race
Vasundhara Volam <[email protected]>
be2net: pass if_id for v1 and V2 versions of TX_CREATE cmd
Salva Peiró <[email protected]>
wanxl: fix info leak in ioctl
Vlad Yasevich <[email protected]>
sctp: Perform software checksum if packet has to be fragmented.
Fan Du <[email protected]>
sctp: Use software crc32 checksum when xfrm transform will happen.
Vlad Yasevich <[email protected]>
net: dst: provide accessor function to dst->xfrm
Vlad Yasevich <[email protected]>
bridge: Correctly clamp MAX forward_delay when enabling STP
Jason Wang <[email protected]>
virtio-net: refill only when device is up during setting queues
Jason Wang <[email protected]>
virtio-net: fix the race between channels setting and refill
Jason Wang <[email protected]>
virtio-net: don't respond to cpu hotplug notifier if we're not ready
Eric Dumazet <[email protected]>
bnx2x: record rx queue for LRO packets
Mathias Krause <[email protected]>
connector: use nlmsg_len() to check message length
Mathias Krause <[email protected]>
unix_diag: fix info leak
Salva Peiró <[email protected]>
farsync: fix info leak in ioctl
Eric Dumazet <[email protected]>
l2tp: must disable bh before calling l2tp_xmit_skb()
Christophe Gouault <[email protected]>
vti: get rid of nf mark rule in prerouting
Marc Kleine-Budde <[email protected]>
net: vlan: fix nlmsg size calculation in vlan_get_size()
Paul Durrant <[email protected]>
xen-netback: Don't destroy the netdev until the vif is shut down
Fabio Estevam <[email protected]>
net: secure_seq: Fix warning when CONFIG_IPV6 and CONFIG_INET are not selected
Marc Kleine-Budde <[email protected]>
can: dev: fix nlmsg size calculation in can_get_size()
Jiri Benc <[email protected]>
ipv4: fix ineffective source address selection
Mathias Krause <[email protected]>
proc connector: fix info leaks
Dan Carpenter <[email protected]>
net: heap overflow in __audit_sockaddr()
Sebastian Hesselbarth <[email protected]>
net: mv643xx_eth: fix orphaned statistics timer crash
Sebastian Hesselbarth <[email protected]>
net: mv643xx_eth: update statistics timer from timer context only
David S. Miller <[email protected]>
l2tp: Fix build warning with ipv6 disabled.
François CACHEREUL <[email protected]>
l2tp: fix kernel panic when using IPv4-mapped IPv6 addresses
Eric Dumazet <[email protected]>
net: do not call sock_put() on TIMEWAIT sockets
Yuchung Cheng <[email protected]>
tcp: fix incorrect ca_state in tail loss probe
Eric Dumazet <[email protected]>
tcp: do not forget FIN in tcp_shifted_skb()
Eric Dumazet <[email protected]>
tcp: must unclone packets before mangling them
Eric Dumazet <[email protected]>
tcp: TSQ can use a dynamic limit
Eric Dumazet <[email protected]>
tcp: TSO packets automatic sizing
-------------
Diffstat:
Documentation/networking/ip-sysctl.txt | 9 +++++ Makefile | 4 +-- arch/arm/boot/dts/integratorcp.dts | 9 +++-- arch/arm/include/asm/syscall.h | 6 ++++ drivers/connector/cn_proc.c | 18 ++++++++++ drivers/connector/connector.c | 7 ++-- drivers/gpio/gpio-lynxpoint.c | 5 +-- drivers/i2c/busses/i2c-ismt.c | 3 ++ drivers/md/dm-snap-persistent.c | 18 ++++++---- drivers/net/can/dev.c | 10 +++--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 1 + drivers/net/ethernet/emulex/benet/be_cmds.c | 3 +- drivers/net/ethernet/marvell/mv643xx_eth.c | 6 ++-- drivers/net/ethernet/ti/davinci_emac.c | 3 +- drivers/net/virtio_net.c | 17 ++++++--- drivers/net/wan/farsync.c | 1 + drivers/net/wan/wanxl.c | 1 + drivers/net/xen-netback/common.h | 1 + drivers/net/xen-netback/interface.c | 12 +++++-- drivers/net/xen-netback/xenbus.c | 17 ++++++--- drivers/tty/serial/vt8500_serial.c | 5 +-- drivers/usb/serial/option.c | 9 ++++- drivers/usb/serial/ti_usb_3410_5052.c | 1 + include/linux/skbuff.h | 5 +++ include/net/cipso_ipv4.h | 6 ++-- include/net/dst.h | 12 +++++++ include/net/ip6_route.h | 6 ++-- include/net/sock.h | 2 ++ include/net/tcp.h | 1 + mm/huge_memory.c | 10 +++++- mm/page-writeback.c | 10 +++--- net/8021q/vlan_netlink.c | 2 +- net/bridge/br_stp_if.c | 2 +- net/compat.c | 2 ++ net/core/secure_seq.c | 2 ++ net/core/sock.c | 1 + net/ipv4/inet_hashtables.c | 2 +- net/ipv4/ip_output.c | 2 +- net/ipv4/ip_vti.c | 14 ++++++-- net/ipv4/route.c | 2 +- net/ipv4/sysctl_net_ipv4.c | 10 ++++++ net/ipv4/tcp.c | 28 ++++++++++++--- net/ipv4/tcp_input.c | 41 ++++++++++++++++++++-- net/ipv4/tcp_output.c | 28 +++++++++------ net/ipv6/inet6_hashtables.c | 2 +- net/ipv6/ip6_output.c | 6 ++-- net/ipv6/route.c | 46 ++++++++++++++++++++----- net/l2tp/l2tp_core.c | 36 +++++++++++++++---- net/l2tp/l2tp_core.h | 3 ++ net/l2tp/l2tp_ppp.c | 4 +++ net/netfilter/nf_conntrack_h323_main.c | 4 +-- net/sctp/output.c | 3 +- net/socket.c | 24 ++++++++++--- net/unix/af_unix.c | 10 ++++++ net/unix/diag.c | 1 + net/wireless/radiotap.c | 7 +++- sound/pci/hda/hda_generic.c | 2 +- sound/usb/usx2y/us122l.c | 4 ++- 58 files changed, 394 insertions(+), 112 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/54 tcp: TSO packets automatic sizing
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commits 6d36824e730f247b602c90e8715a792003e3c5a7,
02cf4ebd82ff0ac7254b88e466820a290ed8289a, and parts of 7eec4174ff29cd42f2acfae8112f51c228545d40 ]
After hearing many people over past years complaining against TSO being bursty or even buggy, we are proud to present automatic sizing of TSO packets.
One part of the problem is that tcp_tso_should_defer() uses an heuristic relying on upcoming ACKS instead of a timer, but more generally, having big TSO packets makes little sense for low rates, as it tends to create micro bursts on the network, and general consensus is to reduce the buffering amount.
This patch introduces a per socket sk_pacing_rate, that approximates the current sending rate, and allows us to size the TSO packets so that we try to send one packet every ms.
This field could be set by other transports.
Patch has no impact for high speed flows, where having large TSO packets makes sense to reach line rate.
For other flows, this helps better packet scheduling and ACK clocking.
This patch increases performance of TCP flows in lossy environments.
A new sysctl (tcp_min_tso_segs) is added, to specify the minimal size of a TSO packet (default being 2).
A follow-up patch will provide a new packet scheduler (FQ), using sk_pacing_rate as an input to perform optional per flow pacing.
This explains why we chose to set sk_pacing_rate to twice the current rate, allowing 'slow start' ramp up.
sk_pacing_rate = 2 * cwnd * mss / srtt
v2: Neal Cardwell reported a suspect deferring of last two segments on initial write of 10 MSS, I had to change tcp_tso_should_defer() to take into account tp->xmit_size_goal_segs
--- Documentation/networking/ip-sysctl.txt | 9 ++++++++ include/net/sock.h | 2 + include/net/tcp.h | 1 net/core/sock.c | 1 net/ipv4/sysctl_net_ipv4.c | 10 +++++++++ net/ipv4/tcp.c | 28 ++++++++++++++++++++++----- net/ipv4/tcp_input.c | 34 ++++++++++++++++++++++++++++++++- net/ipv4/tcp_output.c | 2 - 8 files changed, 80 insertions(+), 7 deletions(-)
Documentation/networking/ip-sysctl.txt +9 -0
@@ -478,6 +478,15 @@ tcp_syn_retries - INTEGER tcp_timestamps - BOOLEAN Enable timestamps as defined in RFC1323. +tcp_min_tso_segs - INTEGER + Minimal number of segments per TSO frame. + Since linux-3.12, TCP does an automatic sizing of TSO frames, + depending on flow rate, instead of filling 64Kbytes packets. + For specific usages, it's possible to force TCP to build big + TSO frames. Note that TCP stack might split too big TSO packets + if available window is too small. + Default: 2 + tcp_tso_win_divisor - INTEGER This allows control over what percentage of the congestion window can be consumed by a single TSO frame.
include/net/sock.h +2 -0
@@ -230,6 +230,7 @@ struct cg_proto;* @sk_wmem_queued: persistent queue size * @sk_forward_alloc: space allocated forward * @sk_allocation: allocation mode +* @sk_pacing_rate: Pacing rate (if supported by transport/packet scheduler) * @sk_sndbuf: size of send buffer in bytes * @sk_flags: %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, * %SO_OOBINLINE settings, %SO_TIMESTAMPING settings
@@ -355,6 +356,7 @@ struct sock {kmemcheck_bitfield_end (flags);int sk_wmem_queued;gfp_t sk_allocation; +u32 sk_pacing_rate;/* bytes per second */ netdev_features_t sk_route_caps;netdev_features_t sk_route_nocaps;int sk_gso_type;
include/net/tcp.h +1 -0
@@ -287,6 +287,7 @@ extern int sysctl_tcp_thin_dupack;extern int sysctl_tcp_early_retrans;extern int sysctl_tcp_limit_output_bytes;extern int sysctl_tcp_challenge_ack_limit; +extern int sysctl_tcp_min_tso_segs;extern atomic_long_t tcp_memory_allocated;extern struct percpu_counter tcp_sockets_allocated;
net/core/sock.c +1 -0
@@ -2271,6 +2271,7 @@ void sock_init_data(struct socket *sock, sk->sk_stamp =ktime_set (-1L ,0 ); + sk->sk_pacing_rate = ~0U ;/* * Before updating sk_refcnt, we must commit prior changes to memory * (Documentation/RCU/rculist_nulls.txt for details)
net/ipv4/sysctl_net_ipv4.c +10 -0
@@ -29,6 +29,7 @@static int zero;static int one =1 ;static int four =4 ; +static int gso_max_segs =GSO_MAX_SEGS ;static int tcp_retr1_max =255 ;static int ip_local_port_range_min[] = {1 ,1 };static int ip_local_port_range_max[] = {65535 ,65535 };
@@ -753,6 +754,15 @@ static struct ctl_table ipv4_table[] = { .extra2 = &four, }, { + .procname = "tcp_min_tso_segs", + .data = &sysctl_tcp_min_tso_segs, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = proc_dointvec_minmax, + .extra1 = &zero, + .extra2 = &gso_max_segs, + }, + { .procname = "udp_mem", .data = &sysctl_udp_mem, .maxlen = sizeof(sysctl_udp_mem),
net/ipv4/tcp.c +23 -5
@@ -282,6 +282,8 @@int sysctl_tcp_fin_timeout__read_mostly =TCP_FIN_TIMEOUT ; +int sysctl_tcp_min_tso_segs__read_mostly =2 ; +struct percpu_counter tcp_orphan_count;EXPORT_SYMBOL_GPL (tcp_orphan_count);
@@ -786,12 +788,28 @@ static unsigned int tcp_xmit_size_goal(s xmit_size_goal = mss_now;if (large_allowed &&sk_can_gso (sk)) { - xmit_size_goal = ((sk->sk_gso_max_size -1 ) - -inet_csk (sk)->icsk_af_ops->net_header_len - -inet_csk (sk)->icsk_ext_hdr_len - - tp->tcp_header_len); +u32 gso_size, hlen; -/* TSQ : try to have two TSO segments in flight */ +/* Maybe we should/could use sk->sk_prot->max_header here ? */ + hlen =inet_csk (sk)->icsk_af_ops->net_header_len + +inet_csk (sk)->icsk_ext_hdr_len + + tp->tcp_header_len; + +/* Goal is to send at least one packet per ms, +* not one big TSO packet every 100 ms. +* This preserves ACK clocking and is consistent +* with tcp_tso_should_defer() heuristic. +*/ + gso_size = sk->sk_pacing_rate / (2 *MSEC_PER_SEC ); + gso_size =max_t (u32, gso_size, + sysctl_tcp_min_tso_segs * mss_now); + + xmit_size_goal =min_t (u32, gso_size, + sk->sk_gso_max_size -1 - hlen); + +/* TSQ : try to have at least two segments in flight +* (one in NIC TX ring, another in Qdisc) +*/ xmit_size_goal =min_t (u32, xmit_size_goal, sysctl_tcp_limit_output_bytes >>1 );
net/ipv4/tcp_input.c +33 -1
@@ -699,6 +699,34 @@ static void tcp_rtt_estimator(struct soc } } +/* Set the sk_pacing_rate to allow proper sizing of TSO packets. +* Note: TCP stack does not yet implement pacing. +* FQ packet scheduler can be used to implement cheap but effective +* TCP pacing, to smooth the burst on large writes when packets +* in flight is significantly lower than cwnd (or rwin) +*/ +static void tcp_update_pacing_rate (struct sock *sk) +{ +const struct tcp_sock *tp =tcp_sk (sk); +u64 rate; + +/* set sk_pacing_rate to 200 % of current rate (mss * cwnd / srtt) */ + rate = (u64 )tp->mss_cache *2 * (HZ <<3 ); + + rate *=max (tp->snd_cwnd, tp->packets_out); + +/* Correction for small srtt : minimum srtt being 8 (1 jiffy << 3), +* be conservative and assume srtt = 1 (125 us instead of 1.25 ms) +* We probably need usec resolution in the future. +* Note: This also takes care of possible srtt=0 case, +* when tcp_rtt_estimator() was not yet called. +*/ +if (tp->srtt >8 +2 ) +do_div (rate, tp->srtt); + + sk->sk_pacing_rate =min_t (u64, rate, ~0U ); +} +/* Calculate rto without backoff. This is the second half of Van Jacobson's * routine referred to above. */
@@ -3330,7 +3358,7 @@ static int tcp_ack(struct sock *sk, consu32 ack_seq =TCP_SKB_CB (skb)->seq;u32 ack =TCP_SKB_CB (skb)->ack_seq;bool is_dupack = false; -u32 prior_in_flight; +u32 prior_in_flight, prior_cwnd = tp->snd_cwnd, prior_rtt = tp->srtt;u32 prior_fackets;int prior_packets = tp->packets_out;int prior_sacked = tp->sacked_out;
@@ -3438,6 +3466,8 @@ static int tcp_ack(struct sock *sk, consif (icsk->icsk_pending ==ICSK_TIME_RETRANS )tcp_schedule_loss_probe (sk); +if (tp->srtt != prior_rtt || tp->snd_cwnd != prior_cwnd) +tcp_update_pacing_rate (sk);return 1 ; no_queue:
@@ -5736,6 +5766,8 @@ int tcp_rcv_state_process(struct sock *s }else tcp_init_metrics (sk); +tcp_update_pacing_rate (sk); +/* Prevent spurious tcp_cwnd_restart() on * first data packet. */
net/ipv4/tcp_output.c +1 -1
@@ -1623,7 +1623,7 @@ static bool tcp_tso_should_defer(struct/* If a full-sized TSO skb can be sent, do it. */ if (limit >= min_t(unsigned int, sk->sk_gso_max_size, - sk->sk_gso_max_segs * tp->mss_cache)) + tp->xmit_size_goal_segs * tp->mss_cache)) goto send_now;/* Middle in queue won't get any more data, full sendable already? */
Greg Kroah-Hartman
maintainerPATCH 2/54 tcp: TSQ can use a dynamic limit
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit c9eeec26e32e087359160406f96e0949b3cc6f10 ]
When TCP Small Queues was added, we used a sysctl to limit amount of packets queues on Qdisc/device queues for a given TCP flow.
Problem is this limit is either too big for low rates, or too small for high rates.
Now TCP stack has rate estimation in sk->sk_pacing_rate, and TSO auto sizing, it can better control number of packets in Qdisc/device queues.
New limit is two packets or at least 1 to 2 ms worth of packets.
Low rates flows benefit from this patch by having even smaller number of packets in queues, allowing for faster recovery, better RTT estimations.
High rates flows benefit from this patch by allowing more than 2 packets in flight as we had reports this was a limiting factor to reach line rate. [ In particular if TX completion is delayed because of coalescing parameters ]
Example for a single flow on 10Gbp link controlled by FQ/pacing
14 packets in flight instead of 2
$ tc -s -d qd qdisc fq 8001: dev eth0 root refcnt 32 limit 10000p flow_limit 100p buckets 1024 quantum 3028 initial_quantum 15140 Sent 1168459366606 bytes 771822841 pkt (dropped 0, overlimits 0 requeues 6822476) rate 9346Mbit 771713pps backlog 953820b 14p requeues 6822476 2047 flow, 2046 inactive, 1 throttled, delay 15673 ns 2372 gc, 0 highprio, 0 retrans, 9739249 throttled, 0 flows_plimit
Note that sk_pacing_rate is currently set to twice the actual rate, but this might be refined in the future when a flow is in congestion avoidance.
Additional change : skb->destructor should be set to tcp_wfree().
A future patch (for linux 3.13+) might remove tcp_limit_output_bytes
--- net/ipv4/tcp_output.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
net/ipv4/tcp_output.c +11 -6
@@ -887,8 +887,7 @@ static int tcp_transmit_skb(struct sockskb_orphan (skb); skb->sk = sk; - skb->destructor = (sysctl_tcp_limit_output_bytes >0 ) ? - tcp_wfree : sock_wfree; + skb->destructor = tcp_wfree;atomic_add (skb->truesize, &sk->sk_wmem_alloc);/* Build TCP header and checksum it. */
@@ -1832,7 +1831,6 @@ static bool tcp_write_xmit(struct sock *while ((skb =tcp_send_head (sk))) {unsigned int limit; - tso_segs =tcp_init_tso_segs (sk, skb, mss_now);BUG_ON (!tso_segs);
@@ -1861,13 +1859,20 @@ static bool tcp_write_xmit(struct sock *break ; } -/* TSQ : sk_wmem_alloc accounts skb truesize, -* including skb overhead. But thats OK. +/* TCP Small Queues : +* Control number of packets in qdisc/devices to two packets / or ~1 ms. +* This allows for : +* - better RTT estimation and ACK scheduling +* - faster recovery +* - high rates */ -if (atomic_read (&sk->sk_wmem_alloc) >= sysctl_tcp_limit_output_bytes) { + limit =max (skb->truesize, sk->sk_pacing_rate >>10 ); + +if (atomic_read (&sk->sk_wmem_alloc) > limit) {set_bit (TSQ_THROTTLED , &tp->tsq_flags);break ; } + limit = mss_now;if (tso_segs >1 && !tcp_urg_mode (tp)) limit = tcp_mss_split_point(sk, skb, mss_now,
Greg Kroah-Hartman
maintainerPATCH 3/54 tcp: must unclone packets before mangling them
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit c52e2421f7368fd36cbe330d2cf41b10452e39a9 ]
TCP stack should make sure it owns skbs before mangling them.
We had various crashes using bnx2x, and it turned out gso_size was cleared right before bnx2x driver was populating TC descriptor of the _previous_ packet send. TCP stack can sometime retransmit packets that are still in Qdisc.
Of course we could make bnx2x driver more robust (using ACCESS_ONCE(shinfo->gso_size) for example), but the bug is TCP stack.
We have identified two points where skb_unclone() was needed.
This patch adds a WARN_ON_ONCE() to warn us if we missed another fix of this kind.
Kudos to Neal for finding the root cause of this bug. Its visible using small MSS.
--- net/ipv4/tcp_output.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
net/ipv4/tcp_output.c +6 -3
@@ -976,6 +976,9 @@ static void tcp_queue_skb(struct sock *sstatic void tcp_set_skb_tso_segs (const struct sock *sk,struct sk_buff *skb,unsigned int mss_now) { +/* Make sure we own this skb before messing gso_size/gso_segs */ +WARN_ON_ONCE (skb_cloned (skb)); +if (skb->len <= mss_now || !sk_can_gso (sk) || skb->ip_summed ==CHECKSUM_NONE ) {/* Avoid the costly divide in the normal
@@ -1057,9 +1060,7 @@ int tcp_fragment(struct sock *sk, structif (nsize <0 ) nsize =0 ; -if (skb_cloned (skb) && -skb_is_nonlinear (skb) && -pskb_expand_head (skb,0 ,0 ,GFP_ATOMIC )) +if (skb_unclone (skb,GFP_ATOMIC ))return -ENOMEM ;/* Get a new skb... force flag on. */
@@ -2334,6 +2335,8 @@ int __tcp_retransmit_skb(struct sock *skint oldpcount =tcp_skb_pcount (skb);if (unlikely (oldpcount >1 )) { +if (skb_unclone (skb,GFP_ATOMIC )) +return -ENOMEM ;tcp_init_tso_segs (sk, skb, cur_mss);tcp_adjust_pcount (sk, skb, oldpcount -tcp_skb_pcount (skb)); }
Greg Kroah-Hartman
maintainerPATCH 4/54 tcp: do not forget FIN in tcp_shifted_skb()
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit 5e8a402f831dbe7ee831340a91439e46f0d38acd ]
Yuchung found following problem :
There are bugs in the SACK processing code, merging part in tcp_shift_skb_data(), that incorrectly resets or ignores the sacked skbs FIN flag. When a receiver first SACK the FIN sequence, and later throw away ofo queue (e.g., sack-reneging), the sender will stop retransmitting the FIN flag, and hangs forever.
Following packetdrill test can be used to reproduce the bug.
$ cat sack-merge-bug.pkt `sysctl -q net.ipv4.tcp_fack=0`
// Establish a connection and send 10 MSS.
0.000 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +.000 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 +.000 bind(3, ..., ...) = 0
+.000 listen(3, 1) = 0
+.050 < S 0:0(0) win 32792 <mss 1000,sackOK,nop,nop,nop,wscale 7> +.000 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 6> +.001 < . 1:1(0) ack 1 win 1024
+.000 accept(3, ..., ...) = 4
+.100 write(4, ..., 12000) = 12000
+.000 shutdown(4, SHUT_WR) = 0
+.000 > . 1:10001(10000) ack 1
+.050 < . 1:1(0) ack 2001 win 257
+.000 > FP. 10001:12001(2000) ack 1
+.050 < . 1:1(0) ack 2001 win 257 <sack 10001:11001,nop,nop> +.050 < . 1:1(0) ack 2001 win 257 <sack 10001:12002,nop,nop> // SACK reneg
+.050 < . 1:1(0) ack 12001 win 257
+0 %{ print "unacked: ",tcpi_unacked }%
+5 %{ print "" }%
First, a typo inverted left/right of one OR operation, then code forgot to advance end_seq if the merged skb carried FIN.
Bug was added in 2.6.29 by commit 832d11c5cd076ab ("tcp: Try to restore large SKBs while SACK processing")
--- net/ipv4/tcp_input.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
net/ipv4/tcp_input.c +4 -1
@@ -1292,7 +1292,10 @@ static bool tcp_shifted_skb(struct sock tp->lost_cnt_hint -=tcp_skb_pcount (prev); } -TCP_SKB_CB (skb)->tcp_flags |=TCP_SKB_CB (prev)->tcp_flags; +TCP_SKB_CB (prev)->tcp_flags |=TCP_SKB_CB (skb)->tcp_flags; +if (TCP_SKB_CB (skb)->tcp_flags &TCPHDR_FIN ) +TCP_SKB_CB (prev)->end_seq++; +if (skb ==tcp_highest_sack (sk))tcp_advance_highest_sack (sk, skb);
Greg Kroah-Hartman
maintainerPATCH 5/54 tcp: fix incorrect ca_state in tail loss probe
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yuchung Cheng <[email protected]>
[ Upstream commit 031afe4990a7c9dbff41a3a742c44d3e740ea0a1 ]
On receiving an ACK that covers the loss probe sequence, TLP immediately sets the congestion state to Open, even though some packets are not recovered and retransmisssion are on the way. The later ACks may trigger a WARN_ON check in step D of tcp_fastretrans_alert(), e.g.,
https://bugzilla.redhat.com/show_bug.cgi?id=989251
The fix is to follow the similar procedure in recovery by calling tcp_try_keep_open(). The sender switches to Open state if no packets are retransmissted. Otherwise it goes to Disorder and let subsequent ACKs move the state to Recovery or Open.
--- net/ipv4/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/tcp_input.c +1 -1
@@ -3345,7 +3345,7 @@ static void tcp_process_tlp_ack(struct stcp_init_cwnd_reduction (sk, true);tcp_set_ca_state (sk,TCP_CA_CWR );tcp_end_cwnd_reduction (sk); -tcp_set_ca_state (sk, TCP_CA_Open); +tcp_try_keep_open (sk);NET_INC_STATS_BH (sock_net (sk),LINUX_MIB_TCPLOSSPROBERECOVERY ); }
Greg Kroah-Hartman
maintainerPATCH 6/54 net: do not call sock_put() on TIMEWAIT sockets
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit 80ad1d61e72d626e30ebe8529a0455e660ca4693 ]
commit 3ab5aee7fe84 ("net: Convert TCP & DCCP hash tables to use RCU / hlist_nulls") incorrectly used sock_put() on TIMEWAIT sockets.
We should instead use inet_twsk_put()
--- net/ipv4/inet_hashtables.c | 2 +- net/ipv6/inet6_hashtables.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
net/ipv4/inet_hashtables.c +1 -1
@@ -287,7 +287,7 @@ begintw:if (unlikely (!INET_TW_MATCH (sk, net, acookie, saddr, daddr, ports, dif))) { -sock_put (sk); +inet_twsk_put (inet_twsk (sk)); goto begintw; } goto out;
net/ipv6/inet6_hashtables.c +1 -1
@@ -116,7 +116,7 @@ begintw: }if (unlikely (!INET6_TW_MATCH (sk, net, saddr, daddr, ports, dif))) { -sock_put (sk); +inet_twsk_put (inet_twsk (sk)); goto begintw; } goto out;
Greg Kroah-Hartman
maintainerPATCH 7/54 l2tp: fix kernel panic when using IPv4-mapped IPv6 addresses
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: François CACHEREUL <[email protected]>
[ Upstream commit e18503f41f9b12132c95d7c31ca6ee5155e44e5c ]
IPv4 mapped addresses cause kernel panic.
The patch juste check whether the IPv6 address is an IPv4 mapped address. If so, use IPv4 API instead of IPv6.
[ 940.026915] general protection fault: 0000 [#1] [ 940.026915] Modules linked in: l2tp_ppp l2tp_netlink l2tp_core pppox ppp_generic slhc loop psmouse [ 940.026915] CPU: 0 PID: 3184 Comm: memcheck-amd64- Not tainted 3.11.0+ #1 [ 940.026915] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007 [ 940.026915] task: ffff880007130e20 ti: ffff88000737e000 task.ti: ffff88000737e000 [ 940.026915] RIP: 0010:[<ffffffff81333780>] [<ffffffff81333780>] ip6_xmit+0x276/0x326 [ 940.026915] RSP: 0018:ffff88000737fd28 EFLAGS: 00010286 [ 940.026915] RAX: c748521a75ceff48 RBX: ffff880000c30800 RCX: 0000000000000000 [ 940.026915] RDX: ffff88000075cc4e RSI: 0000000000000028 RDI: ffff8800060e5a40 [ 940.026915] RBP: ffff8800060e5a40 R08: 0000000000000000 R09: ffff88000075cc90 [ 940.026915] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88000737fda0 [ 940.026915] R13: 0000000000000000 R14: 0000000000002000 R15: ffff880005d3b580 [ 940.026915] FS: 00007f163dc5e800(0000) GS:ffffffff81623000(0000) knlGS:0000000000000000 [ 940.026915] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 940.026915] CR2: 00000004032dc940 CR3: 0000000005c25000 CR4: 00000000000006f0 [ 940.026915] Stack: [ 940.026915] ffff88000075cc4e ffffffff81694e90 ffff880000c30b38 0000000000000020 [ 940.026915] 11000000523c4bac ffff88000737fdb4 0000000000000000 ffff880000c30800 [ 940.026915] ffff880005d3b580 ffff880000c30b38 ffff8800060e5a40 0000000000000020 [ 940.026915] Call Trace: [ 940.026915] [<ffffffff81356cc3>] ? inet6_csk_xmit+0xa4/0xc4 [ 940.026915] [<ffffffffa0038535>] ? l2tp_xmit_skb+0x503/0x55a [l2tp_core] [ 940.026915] [<ffffffff812b8d3b>] ? pskb_expand_head+0x161/0x214 [ 940.026915] [<ffffffffa003e91d>] ? pppol2tp_xmit+0xf2/0x143 [l2tp_ppp] [ 940.026915] [<ffffffffa00292e0>] ? ppp_channel_push+0x36/0x8b [ppp_generic] [ 940.026915] [<ffffffffa00293fe>] ? ppp_write+0xaf/0xc5 [ppp_generic] [ 940.026915] [<ffffffff8110ead4>] ? vfs_write+0xa2/0x106 [ 940.026915] [<ffffffff8110edd6>] ? SyS_write+0x56/0x8a [ 940.026915] [<ffffffff81378ac0>] ? system_call_fastpath+0x16/0x1b [ 940.026915] Code: 00 49 8b 8f d8 00 00 00 66 83 7c 11 02 00 74 60 49 8b 47 58 48 83 e0 fe 48 8b 80 18 01 00 00 48 85 c0 74 13 48 8b 80 78 02 00 00 <48> ff 40 28 41 8b 57 68 48 01 50 30 48 8b 54 24 08 49 c7 c1 51 [ 940.026915] RIP [<ffffffff81333780>] ip6_xmit+0x276/0x326 [ 940.026915] RSP <ffff88000737fd28> [ 940.057945] ---[ end trace be8aba9a61c8b7f3 ]--- [ 940.058583] Kernel panic - not syncing: Fatal exception in interrupt
--- net/l2tp/l2tp_core.c | 27 +++++++++++++++++++++++---- net/l2tp/l2tp_core.h | 3 +++ 2 files changed, 26 insertions(+), 4 deletions(-)
net/l2tp/l2tp_core.c +23 -4
@@ -499,6 +499,7 @@ out:static inline int l2tp_verify_udp_checksum (struct sock *sk,struct sk_buff *skb) { +struct l2tp_tunnel *tunnel = (struct l2tp_tunnel *)sk->sk_user_data;struct udphdr *uh =udp_hdr (skb);u16 ulen =ntohs (uh->len);__wsum psum;
@@ -507,7 +508,7 @@ static inline int l2tp_verify_udp_checksreturn 0 ;#if IS_ENABLED (CONFIG_IPV6 ) -if (sk->sk_family ==PF_INET6 ) { +if (sk->sk_family ==PF_INET6 && !tunnel->v4mapped) {if (!uh->check) {LIMIT_NETDEBUG (KERN_INFO "L2TP: IPv6: checksum is 0\n" );return 1 ;
@@ -1071,7 +1072,7 @@ static int l2tp_xmit_core(struct l2tp_se/* Queue the packet to IP for output */ skb->local_df =1 ;#if IS_ENABLED (CONFIG_IPV6 ) -if (skb->sk->sk_family ==PF_INET6 ) +if (skb->sk->sk_family ==PF_INET6 && !tunnel->v4mapped) error =inet6_csk_xmit (skb,NULL ); else#endif
@@ -1198,7 +1199,7 @@ int l2tp_xmit_skb(struct l2tp_session *s/* Calculate UDP checksum if configured to do so */ #if IS_ENABLED (CONFIG_IPV6 ) -if (sk->sk_family ==PF_INET6 ) +if (sk->sk_family ==PF_INET6 && !tunnel->v4mapped)l2tp_xmit_ipv6_csum (sk, skb, udp_len); else#endif
@@ -1647,6 +1648,24 @@ int l2tp_tunnel_create(struct net *net,if (cfg !=NULL ) tunnel->debug = cfg->debug; +#if IS_ENABLED (CONFIG_IPV6 ) +if (sk->sk_family ==PF_INET6 ) { +struct ipv6_pinfo *np =inet6_sk (sk); + +if (ipv6_addr_v4mapped (&np->saddr) && +ipv6_addr_v4mapped (&np->daddr)) { +struct inet_sock *inet =inet_sk (sk); + + tunnel->v4mapped = true; + inet->inet_saddr = np->saddr.s6_addr32[3 ]; + inet->inet_rcv_saddr = np->rcv_saddr.s6_addr32[3 ]; + inet->inet_daddr = np->daddr.s6_addr32[3 ]; + }else { + tunnel->v4mapped = false; + } + } +#endif +/* Mark socket as an encapsulation socket. See net/ipv4/udp.c */ tunnel->encap = encap;if (encap ==L2TP_ENCAPTYPE_UDP ) {
@@ -1655,7 +1674,7 @@ int l2tp_tunnel_create(struct net *net,udp_sk (sk)->encap_rcv = l2tp_udp_encap_recv;udp_sk (sk)->encap_destroy = l2tp_udp_encap_destroy;#if IS_ENABLED (CONFIG_IPV6 ) -if (sk->sk_family ==PF_INET6 ) +if (sk->sk_family ==PF_INET6 && !tunnel->v4mapped)udpv6_encap_enable (); else#endif
net/l2tp/l2tp_core.h +3 -0
@@ -189,6 +189,9 @@ struct l2tp_tunnel {struct sock *sock;/* Parent socket */ int fd;/* Parent fd, if tunnel socket * was created by userspace */ +#if IS_ENABLED (CONFIG_IPV6 ) +bool v4mapped; +#endif struct work_struct del_work;
Greg Kroah-Hartman
maintainerPATCH 8/54 l2tp: Fix build warning with ipv6 disabled.
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: "David S. Miller" <[email protected]>
[ Upstream commit 8d8a51e26a6d415e1470759f2cf5f3ee3ee86196 ]
net/l2tp/l2tp_core.c: In function ‘l2tp_verify_udp_checksum’:net/l2tp/l2tp_core.c:499:22: warning: unused variable ‘tunnel’ [-Wunused-variable]
Create a helper "l2tp_tunnel()" to facilitate this, and as a side effect get rid of a bunch of unnecessary void pointer casts.
--- net/l2tp/l2tp_core.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
net/l2tp/l2tp_core.c +8 -5
@@ -115,6 +115,11 @@ struct l2tp_net {static void l2tp_session_set_header_len (struct l2tp_session *session,int version);static void l2tp_tunnel_free (struct l2tp_tunnel *tunnel); +static inline struct l2tp_tunnel *l2tp_tunnel (struct sock *sk) +{ +return sk->sk_user_data; +} +static inline struct l2tp_net *l2tp_pernet (struct net *net) {BUG_ON (!net);
@@ -499,7 +504,6 @@ out:static inline int l2tp_verify_udp_checksum (struct sock *sk,struct sk_buff *skb) { -struct l2tp_tunnel *tunnel = (struct l2tp_tunnel *)sk->sk_user_data;struct udphdr *uh =udp_hdr (skb);u16 ulen =ntohs (uh->len);__wsum psum;
@@ -508,7 +512,7 @@ static inline int l2tp_verify_udp_checksreturn 0 ;#if IS_ENABLED (CONFIG_IPV6 ) -if (sk->sk_family ==PF_INET6 && !tunnel->v4mapped) { +if (sk->sk_family ==PF_INET6 && !l2tp_tunnel (sk)->v4mapped) {if (!uh->check) {LIMIT_NETDEBUG (KERN_INFO "L2TP: IPv6: checksum is 0\n" );return 1 ;
@@ -1248,10 +1252,9 @@ EXPORT_SYMBOL_GPL(l2tp_xmit_skb);*/ static void l2tp_tunnel_destruct (struct sock *sk) { -struct l2tp_tunnel *tunnel; +struct l2tp_tunnel *tunnel =l2tp_tunnel (sk);struct l2tp_net *pn; - tunnel = sk->sk_user_data;if (tunnel ==NULL ) goto end;
@@ -1619,7 +1622,7 @@ int l2tp_tunnel_create(struct net *net, }/* Check if this socket has already been prepped */ - tunnel = (struct l2tp_tunnel *)sk->sk_user_data; + tunnel =l2tp_tunnel (sk);if (tunnel !=NULL ) {/* This socket has already been prepped */ err = -EBUSY ;
Greg Kroah-Hartman
maintainerPATCH 9/54 net: mv643xx_eth: update statistics timer from timer context only
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sebastian Hesselbarth <[email protected]>
[ Upstream commit 041b4ddb84989f06ff1df0ca869b950f1ee3cb1c ]
Each port driver installs a periodic timer to update port statistics by calling mib_counters_update. As mib_counters_update is also called from non-timer context, we should not reschedule the timer there but rather move it to timer-only context.
--- drivers/net/ethernet/marvell/mv643xx_eth.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/marvell/mv643xx_eth.c +1 -3
@@ -1125,15 +1125,13 @@ static void mib_counters_update(struct m p->rx_discard +=rdlp (mp,RX_DISCARD_FRAME_CNT ); p->rx_overrun +=rdlp (mp,RX_OVERRUN_FRAME_CNT );spin_unlock_bh (&mp->mib_counters_lock); - -mod_timer (&mp->mib_counters_timer, jiffies +30 *HZ ); }static void mib_counters_timer_wrapper (unsigned long _mp) {struct mv643xx_eth_private *mp = (void *)_mp; -mib_counters_update (mp); +mod_timer (&mp->mib_counters_timer, jiffies +30 *HZ ); }
Greg Kroah-Hartman
maintainerPATCH 10/54 net: mv643xx_eth: fix orphaned statistics timer crash
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sebastian Hesselbarth <[email protected]>
[ Upstream commit f564412c935111c583b787bcc18157377b208e2e ]
The periodic statistics timer gets started at port _probe() time, but is stopped on _stop() only. In a modular environment, this can cause the timer to access already deallocated memory, if the module is unloaded without starting the eth device. To fix this, we add the timer right before the port is started, instead of at _probe() time.
--- drivers/net/ethernet/marvell/mv643xx_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/marvell/mv643xx_eth.c +1 -1
@@ -2229,6 +2229,7 @@ static int mv643xx_eth_open(struct net_d mp->int_mask |=INT_TX_END_0 << i; } +add_timer (&mp->mib_counters_timer);port_start (mp);wrlp (mp,INT_MASK_EXT ,INT_EXT_LINK_PHY |INT_EXT_TX );
@@ -2737,7 +2738,6 @@ static int mv643xx_eth_probe(struct plat mp->mib_counters_timer.data = (unsigned long )mp; mp->mib_counters_timer.function = mib_counters_timer_wrapper; mp->mib_counters_timer.expires = jiffies +30 *HZ ; -add_timer (&mp->mib_counters_timer);spin_lock_init (&mp->mib_counters_lock);
Greg Kroah-Hartman
maintainerPATCH 11/54 net: heap overflow in __audit_sockaddr()
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <[email protected]>
[ Upstream commit 1661bf364ae9c506bc8795fef70d1532931be1e8 ]
We need to cap ->msg_namelen or it leads to a buffer overflow when we to the memcpy() in __audit_sockaddr(). It requires CAP_AUDIT_CONTROL to exploit this bug.
The call tree is:___sys_recvmsg()
move_addr_to_user()
audit_sockaddr()
__audit_sockaddr()--- net/compat.c | 2 ++ net/socket.c | 24 ++++++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-)
net/compat.c +2 -0
@@ -71,6 +71,8 @@ int get_compat_msghdr(struct msghdr *kms__get_user (kmsg->msg_controllen, &umsg->msg_controllen) || __get_user(kmsg->msg_flags, &umsg->msg_flags)) return -EFAULT; +if (kmsg->msg_namelen >sizeof (struct sockaddr_storage )) +return -EINVAL ; kmsg->msg_name =compat_ptr (tmp1); kmsg->msg_iov =compat_ptr (tmp2); kmsg->msg_control =compat_ptr (tmp3);
net/socket.c +20 -4
@@ -1956,6 +1956,16 @@ struct used_address {unsigned int name_len; }; +static int copy_msghdr_from_user (struct msghdr *kmsg, +struct msghdr __user *umsg) +{ +if (copy_from_user (kmsg, umsg,sizeof (struct msghdr ))) +return -EFAULT ; +if (kmsg->msg_namelen >sizeof (struct sockaddr_storage )) +return -EINVAL ; +return 0 ; +} +static int ___sys_sendmsg (struct socket *sock,struct msghdr __user *msg,struct msghdr *msg_sys,unsigned int flags,struct used_address *used_address)
@@ -1974,8 +1984,11 @@ static int ___sys_sendmsg(struct socketif (MSG_CMSG_COMPAT & flags) {if (get_compat_msghdr (msg_sys, msg_compat))return -EFAULT ; - }else if (copy_from_user (msg_sys, msg,sizeof (struct msghdr ))) -return -EFAULT ; + }else { + err =copy_msghdr_from_user (msg_sys, msg); +if (err) +return err; + }if (msg_sys->msg_iovlen >UIO_FASTIOV ) { err = -EMSGSIZE ;
@@ -2183,8 +2196,11 @@ static int ___sys_recvmsg(struct socketif (MSG_CMSG_COMPAT & flags) {if (get_compat_msghdr (msg_sys, msg_compat))return -EFAULT ; - }else if (copy_from_user (msg_sys, msg,sizeof (struct msghdr ))) -return -EFAULT ; + }else { + err =copy_msghdr_from_user (msg_sys, msg); +if (err) +return err; + }if (msg_sys->msg_iovlen >UIO_FASTIOV ) { err = -EMSGSIZE ;
Greg Kroah-Hartman
maintainerPATCH 12/54 proc connector: fix info leaks
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mathias Krause <[email protected]>
[ Upstream commit e727ca82e0e9616ab4844301e6bae60ca7327682 ]
Initialize event_data for all possible message types to prevent leaking kernel stack contents to userland (up to 20 bytes). Also set the flags member of the connector message to 0 to prevent leaking two more stack bytes this way.
--- drivers/connector/cn_proc.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
drivers/connector/cn_proc.c +18 -0
@@ -65,6 +65,7 @@ void proc_fork_connector(struct task_str msg = (struct cn_msg *)buffer; ev = (struct proc_event *)msg->data; +memset (&ev->event_data,0 ,sizeof (ev->event_data));get_seq (&msg->seq, &ev->cpu);ktime_get_ts (&ts);/* get high res monotonic timestamp */ put_unaligned (timespec_to_ns (&ts), (__u64 *)&ev->timestamp_ns);
@@ -80,6 +81,7 @@ void proc_fork_connector(struct task_strmemcpy (&msg->id, &cn_proc_event_id,sizeof (msg->id)); msg->ack =0 ;/* not used */ msg->len =sizeof (*ev); + msg->flags =0 ;/* not used */ /* If cn_netlink_send() failed, the data is not sent */ cn_netlink_send (msg,CN_IDX_PROC ,GFP_KERNEL ); }
@@ -96,6 +98,7 @@ void proc_exec_connector(struct task_str msg = (struct cn_msg *)buffer; ev = (struct proc_event *)msg->data; +memset (&ev->event_data,0 ,sizeof (ev->event_data));get_seq (&msg->seq, &ev->cpu);ktime_get_ts (&ts);/* get high res monotonic timestamp */ put_unaligned (timespec_to_ns (&ts), (__u64 *)&ev->timestamp_ns);
@@ -106,6 +109,7 @@ void proc_exec_connector(struct task_strmemcpy (&msg->id, &cn_proc_event_id,sizeof (msg->id)); msg->ack =0 ;/* not used */ msg->len =sizeof (*ev); + msg->flags =0 ;/* not used */ cn_netlink_send (msg,CN_IDX_PROC ,GFP_KERNEL ); }
@@ -122,6 +126,7 @@ void proc_id_connector(struct task_struc msg = (struct cn_msg *)buffer; ev = (struct proc_event *)msg->data; +memset (&ev->event_data,0 ,sizeof (ev->event_data)); ev->what = which_id; ev->event_data.id.process_pid = task->pid; ev->event_data.id.process_tgid = task->tgid;
@@ -145,6 +150,7 @@ void proc_id_connector(struct task_strucmemcpy (&msg->id, &cn_proc_event_id,sizeof (msg->id)); msg->ack =0 ;/* not used */ msg->len =sizeof (*ev); + msg->flags =0 ;/* not used */ cn_netlink_send (msg,CN_IDX_PROC ,GFP_KERNEL ); }
@@ -160,6 +166,7 @@ void proc_sid_connector(struct task_stru msg = (struct cn_msg *)buffer; ev = (struct proc_event *)msg->data; +memset (&ev->event_data,0 ,sizeof (ev->event_data));get_seq (&msg->seq, &ev->cpu);ktime_get_ts (&ts);/* get high res monotonic timestamp */ put_unaligned (timespec_to_ns (&ts), (__u64 *)&ev->timestamp_ns);
@@ -170,6 +177,7 @@ void proc_sid_connector(struct task_strumemcpy (&msg->id, &cn_proc_event_id,sizeof (msg->id)); msg->ack =0 ;/* not used */ msg->len =sizeof (*ev); + msg->flags =0 ;/* not used */ cn_netlink_send (msg,CN_IDX_PROC ,GFP_KERNEL ); }
@@ -185,6 +193,7 @@ void proc_ptrace_connector(struct task_s msg = (struct cn_msg *)buffer; ev = (struct proc_event *)msg->data; +memset (&ev->event_data,0 ,sizeof (ev->event_data));get_seq (&msg->seq, &ev->cpu);ktime_get_ts (&ts);/* get high res monotonic timestamp */ put_unaligned (timespec_to_ns (&ts), (__u64 *)&ev->timestamp_ns);
@@ -203,6 +212,7 @@ void proc_ptrace_connector(struct task_smemcpy (&msg->id, &cn_proc_event_id,sizeof (msg->id)); msg->ack =0 ;/* not used */ msg->len =sizeof (*ev); + msg->flags =0 ;/* not used */ cn_netlink_send (msg,CN_IDX_PROC ,GFP_KERNEL ); }
@@ -218,6 +228,7 @@ void proc_comm_connector(struct task_str msg = (struct cn_msg *)buffer; ev = (struct proc_event *)msg->data; +memset (&ev->event_data,0 ,sizeof (ev->event_data));get_seq (&msg->seq, &ev->cpu);ktime_get_ts (&ts);/* get high res monotonic timestamp */ put_unaligned (timespec_to_ns (&ts), (__u64 *)&ev->timestamp_ns);
@@ -229,6 +240,7 @@ void proc_comm_connector(struct task_strmemcpy (&msg->id, &cn_proc_event_id,sizeof (msg->id)); msg->ack =0 ;/* not used */ msg->len =sizeof (*ev); + msg->flags =0 ;/* not used */ cn_netlink_send (msg,CN_IDX_PROC ,GFP_KERNEL ); }
@@ -244,6 +256,7 @@ void proc_coredump_connector(struct task msg = (struct cn_msg *)buffer; ev = (struct proc_event *)msg->data; +memset (&ev->event_data,0 ,sizeof (ev->event_data));get_seq (&msg->seq, &ev->cpu);ktime_get_ts (&ts);/* get high res monotonic timestamp */ put_unaligned (timespec_to_ns (&ts), (__u64 *)&ev->timestamp_ns);
@@ -254,6 +267,7 @@ void proc_coredump_connector(struct taskmemcpy (&msg->id, &cn_proc_event_id,sizeof (msg->id)); msg->ack =0 ;/* not used */ msg->len =sizeof (*ev); + msg->flags =0 ;/* not used */ cn_netlink_send (msg,CN_IDX_PROC ,GFP_KERNEL ); }
@@ -269,6 +283,7 @@ void proc_exit_connector(struct task_str msg = (struct cn_msg *)buffer; ev = (struct proc_event *)msg->data; +memset (&ev->event_data,0 ,sizeof (ev->event_data));get_seq (&msg->seq, &ev->cpu);ktime_get_ts (&ts);/* get high res monotonic timestamp */ put_unaligned (timespec_to_ns (&ts), (__u64 *)&ev->timestamp_ns);
@@ -281,6 +296,7 @@ void proc_exit_connector(struct task_strmemcpy (&msg->id, &cn_proc_event_id,sizeof (msg->id)); msg->ack =0 ;/* not used */ msg->len =sizeof (*ev); + msg->flags =0 ;/* not used */ cn_netlink_send (msg,CN_IDX_PROC ,GFP_KERNEL ); }
@@ -304,6 +320,7 @@ static void cn_proc_ack(int err, int rcv msg = (struct cn_msg *)buffer; ev = (struct proc_event *)msg->data; +memset (&ev->event_data,0 ,sizeof (ev->event_data)); msg->seq = rcvd_seq;ktime_get_ts (&ts);/* get high res monotonic timestamp */ put_unaligned (timespec_to_ns (&ts), (__u64 *)&ev->timestamp_ns);
@@ -313,6 +330,7 @@ static void cn_proc_ack(int err, int rcvmemcpy (&msg->id, &cn_proc_event_id,sizeof (msg->id)); msg->ack = rcvd_ack +1 ; msg->len =sizeof (*ev); + msg->flags =0 ;/* not used */ cn_netlink_send (msg,CN_IDX_PROC ,GFP_KERNEL ); }
Greg Kroah-Hartman
maintainerPATCH 13/54 ipv4: fix ineffective source address selection
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiri Benc <[email protected]>
[ Upstream commit 0a7e22609067ff524fc7bbd45c6951dd08561667 ]
When sending out multicast messages, the source address in inet->mc_addr is ignored and rewritten by an autoselected one. This is caused by a typo in commit 813b3b5db831 ("ipv4: Use caller's on-stack flowi as-is in output route lookups").
--- net/ipv4/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/route.c +1 -1
@@ -2020,7 +2020,7 @@ struct rtable *__ip_route_output_key(str RT_SCOPE_LINK); goto make_route; } -if (fl4->saddr) { +if (!fl4->saddr) {if (ipv4_is_multicast (fl4->daddr)) fl4->saddr =inet_select_addr (dev_out,0 , fl4->flowi4_scope);
Greg Kroah-Hartman
maintainerPATCH 14/54 can: dev: fix nlmsg size calculation in can_get_size()
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marc Kleine-Budde <[email protected]>
[ Upstream commit fe119a05f8ca481623a8d02efcc984332e612528 ]
This patch fixes the calculation of the nlmsg size, by adding the missing nla_total_size().
--- drivers/net/can/dev.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/net/can/dev.c +5 -5
@@ -705,14 +705,14 @@ static size_t can_get_size(const structsize_t size; size =nla_total_size (sizeof (u32));/* IFLA_CAN_STATE */ - size +=sizeof (struct can_ctrlmode );/* IFLA_CAN_CTRLMODE */ + size +=nla_total_size (sizeof (struct can_ctrlmode ));/* IFLA_CAN_CTRLMODE */ size +=nla_total_size (sizeof (u32));/* IFLA_CAN_RESTART_MS */ - size +=sizeof (struct can_bittiming );/* IFLA_CAN_BITTIMING */ - size +=sizeof (struct can_clock );/* IFLA_CAN_CLOCK */ + size +=nla_total_size (sizeof (struct can_bittiming ));/* IFLA_CAN_BITTIMING */ + size +=nla_total_size (sizeof (struct can_clock ));/* IFLA_CAN_CLOCK */ if (priv->do_get_berr_counter)/* IFLA_CAN_BERR_COUNTER */ - size +=sizeof (struct can_berr_counter ); + size +=nla_total_size (sizeof (struct can_berr_counter ));if (priv->bittiming_const)/* IFLA_CAN_BITTIMING_CONST */ - size +=sizeof (struct can_bittiming_const ); + size +=nla_total_size (sizeof (struct can_bittiming_const ));return size; }
Greg Kroah-Hartman
maintainerPATCH 15/54 net: secure_seq: Fix warning when CONFIG_IPV6 and CONFIG_INET are not selected
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fabio Estevam <[email protected]>
[ Upstream commit cb03db9d0e964568407fb08ea46cc2b6b7f67587 ]
net_secret() is only used when CONFIG_IPV6 or CONFIG_INET are selected.
Building a defconfig with both of these symbols unselected (Using the ARM at91sam9rl_defconfig, for example) leads to the following build warning:
$ make at91sam9rl_defconfig # # configuration written to .config #
$ make net/core/secure_seq.o scripts/kconfig/conf --silentoldconfig Kconfig CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h make[1]: `include/generated/mach-types.h' is up to date. CALL scripts/checksyscalls.sh CC net/core/secure_seq.o net/core/secure_seq.c:17:13: warning: 'net_secret_init' defined but not used [-Wunused-function]
Fix this warning by protecting the definition of net_secret() with these symbols.
--- net/core/secure_seq.c | 2 ++ 1 file changed, 2 insertions(+)
net/core/secure_seq.c +2 -0
@@ -10,6 +10,7 @@#include <net/secure_seq.h> +#if IS_ENABLED (CONFIG_IPV6 ) ||IS_ENABLED (CONFIG_INET )#define NET_SECRET_SIZE (MD5_MESSAGE_BYTES / 4)static u32 net_secret[NET_SECRET_SIZE ]____cacheline_aligned ;
@@ -29,6 +30,7 @@ static void net_secret_init(void) cmpxchg(&net_secret[--i], 0, tmp); } } +#endif #ifdef CONFIG_INET static u32 seq_scale (u32 seq)
Greg Kroah-Hartman
maintainerPATCH 16/54 xen-netback: Dont destroy the netdev until the vif is shut down
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paul Durrant <[email protected]>
[ upstream commit id: 279f438e36c0a70b23b86d2090aeec50155034a9 ]
Without this patch, if a frontend cycles through states Closing and Closed (which Windows frontends need to do) then the netdev will be destroyed and requires re-invocation of hotplug scripts to restore state before the frontend can move to Connected. Thus when udev is not in use the backend gets stuck in InitWait.
With this patch, the netdev is left alone whilst the backend is still online and is only de-registered and freed just prior to destroying the vif (which is also nicely symmetrical with the netdev allocation and registration being done during probe) so no re-invocation of hotplug scripts is required.
--- drivers/net/xen-netback/common.h | 1 + drivers/net/xen-netback/interface.c | 12 ++++++++++-- drivers/net/xen-netback/xenbus.c | 17 ++++++++++++----- 3 files changed, 23 insertions(+), 7 deletions(-)
drivers/net/xen-netback/common.h +1 -0
@@ -115,6 +115,7 @@ struct xenvif *xenvif_alloc(struct devicint xenvif_connect (struct xenvif *vif,unsigned long tx_ring_ref,unsigned long rx_ring_ref,unsigned int evtchn);void xenvif_disconnect (struct xenvif *vif); +void xenvif_free (struct xenvif *vif);void xenvif_get (struct xenvif *vif);void xenvif_put (struct xenvif *vif);
drivers/net/xen-netback/interface.c +10 -2
@@ -304,6 +304,9 @@ struct xenvif *xenvif_alloc(struct devic }netdev_dbg (dev,"Successfully created xenvif\n" ); + +__module_get (THIS_MODULE ); +return vif; }
@@ -369,9 +372,14 @@ void xenvif_disconnect(struct xenvif *viif (vif->irq)unbind_from_irqhandler (vif->irq, vif); -unregister_netdev (vif->dev); -xen_netbk_unmap_frontend_rings (vif); +} + +void xenvif_free (struct xenvif *vif) +{ +unregister_netdev (vif->dev);free_netdev (vif->dev); + +module_put (THIS_MODULE ); }
drivers/net/xen-netback/xenbus.c +12 -5
@@ -42,7 +42,7 @@ static int netback_remove(struct xenbus_if (be->vif) {kobject_uevent (&dev->dev.kobj,KOBJ_OFFLINE );xenbus_rm (XBT_NIL , dev->nodename,"hotplug-status" ); -xenvif_disconnect (be->vif); +xenvif_free (be->vif); be->vif =NULL ; }kfree (be);
@@ -203,9 +203,18 @@ static void disconnect_backend(struct xe {struct backend_info *be =dev_get_drvdata (&dev->dev); +if (be->vif) +xenvif_disconnect (be->vif); +} + +static void destroy_backend (struct xenbus_device *dev) +{ +struct backend_info *be =dev_get_drvdata (&dev->dev); +if (be->vif) { +kobject_uevent (&dev->dev.kobj,KOBJ_OFFLINE );xenbus_rm (XBT_NIL , dev->nodename,"hotplug-status" ); -xenvif_disconnect (be->vif); +xenvif_free (be->vif); be->vif =NULL ; } }
@@ -237,14 +246,11 @@ static void frontend_changed(struct xenbcase XenbusStateConnected:if (dev->state == XenbusStateConnected)break ; -backend_create_xenvif (be);if (be->vif)connect (be);break ;case XenbusStateClosing: -if (be->vif) -kobject_uevent (&dev->dev.kobj,KOBJ_OFFLINE );disconnect_backend (dev);xenbus_switch_state (dev, XenbusStateClosing);break ;
@@ -253,6 +259,7 @@ static void frontend_changed(struct xenbxenbus_switch_state (dev, XenbusStateClosed);if (xenbus_dev_is_online (dev))break ; +destroy_backend (dev);/* fall through if not online */ case XenbusStateUnknown:device_unregister (&dev->dev);
Greg Kroah-Hartman
maintainerPATCH 17/54 net: vlan: fix nlmsg size calculation in vlan_get_size()
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marc Kleine-Budde <[email protected]>
[ Upstream commit c33a39c575068c2ea9bffb22fd6de2df19c74b89 ]
This patch fixes the calculation of the nlmsg size, by adding the missing nla_total_size().
--- net/8021q/vlan_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/8021q/vlan_netlink.c +1 -1
@@ -171,7 +171,7 @@ static size_t vlan_get_size(const structreturn nla_total_size (2 ) +/* IFLA_VLAN_PROTOCOL */ nla_total_size (2 ) +/* IFLA_VLAN_ID */ -sizeof (struct ifla_vlan_flags ) +/* IFLA_VLAN_FLAGS */ +nla_total_size (sizeof (struct ifla_vlan_flags )) +/* IFLA_VLAN_FLAGS */ vlan_qos_map_size (vlan->nr_ingress_mappings) +vlan_qos_map_size (vlan->nr_egress_mappings); }
Greg Kroah-Hartman
maintainerPATCH 18/54 vti: get rid of nf mark rule in prerouting
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christophe Gouault <[email protected]>
[ Upstream commit 7263a5187f9e9de45fcb51349cf0e031142c19a1 ]
This patch fixes and improves the use of vti interfaces (while lightly changing the way of configuring them).
Currently:
- it is necessary to identify and mark inbound IPsec packets destined to each vti interface, via netfilter rules in the mangle table at prerouting hook.
- the vti module cannot retrieve the right tunnel in input since commit b9959fd3: vti tunnels all have an i_key, but the tunnel lookup is done with flag TUNNEL_NO_KEY, so there no chance to retrieve them.
- the i_key is used by the outbound processing as a mark to lookup for the right SP and SA bundle.
This patch uses the o_key to store the vti mark (instead of i_key) and enables:
- to avoid the need for previously marking the inbound skbuffs via a netfilter rule.
- to properly retrieve the right tunnel in input, only based on the IPsec packet outer addresses.
- to properly perform an inbound policy check (using the tunnel o_key as a mark).
- to properly perform an outbound SPD and SAD lookup (using the tunnel o_key as a mark).
- to keep the current mark of the skbuff. The skbuff mark is neither used nor changed by the vti interface. Only the vti interface o_key is used.
SAs have a wildcard mark.
SPs have a mark equal to the vti interface o_key.
The vti interface must be created as follows (i_key = 0, o_key = mark):
ip link add vti1 mode vti local 1.1.1.1 remote 2.2.2.2 okey 1
The SPs attached to vti1 must be created as follows (mark = vti1 o_key):
ip xfrm policy add dir out mark 1 tmpl src 1.1.1.1 dst 2.2.2.2 \
proto esp mode tunnel
ip xfrm policy add dir in mark 1 tmpl src 2.2.2.2 dst 1.1.1.1 \
proto esp mode tunnelThe SAs are created with the default wildcard mark. There is no distinction between global vs. vti SAs. Just their addresses will possibly link them to a vti interface:
ip xfrm state add src 1.1.1.1 dst 2.2.2.2 proto esp spi 1000 mode tunnel \
enc "cbc(aes)" "azertyuiopqsdfgh"
ip xfrm state add src 2.2.2.2 dst 1.1.1.1 proto esp spi 2000 mode tunnel \
enc "cbc(aes)" "sqbdhgqsdjqjsdfh"To avoid matching "global" (not vti) SPs in vti interfaces, global SPs should no use the default wildcard mark, but explicitly match mark 0.
To avoid a double SPD lookup in input and output (in global and vti SPDs), the NOPOLICY and NOXFRM options should be set on the vti interfaces:
echo 1 > /proc/sys/net/ipv4/conf/vti1/disable_policy echo 1 > /proc/sys/net/ipv4/conf/vti1/disable_xfrm
The outgoing traffic is steered to vti1 by a route via the vti interface:
ip route add 192.168.0.0/16 dev vti1
The incoming IPsec traffic is steered to vti1 because its outer addresses match the vti1 tunnel configuration.
--- net/ipv4/ip_vti.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
net/ipv4/ip_vti.c +11 -3
@@ -285,8 +285,17 @@ static int vti_rcv(struct sk_buff *skb) tunnel =vti_tunnel_lookup (dev_net (skb->dev), iph->saddr, iph->daddr);if (tunnel !=NULL ) {struct pcpu_tstats *tstats; +u32 oldmark = skb->mark; +int ret; -if (!xfrm4_policy_check (NULL ,XFRM_POLICY_IN , skb)) + +/* temporarily mark the skb with the tunnel o_key, to +* only match policies with this mark. +*/ + skb->mark =be32_to_cpu (tunnel->parms.o_key); + ret =xfrm4_policy_check (NULL ,XFRM_POLICY_IN , skb); + skb->mark = oldmark; +if (!ret)return -1 ; tstats =this_cpu_ptr (tunnel->dev->tstats);
@@ -295,7 +304,6 @@ static int vti_rcv(struct sk_buff *skb) tstats->rx_bytes += skb->len;u64_stats_update_end (&tstats->syncp); - skb->mark =0 ;secpath_reset (skb); skb->dev = tunnel->dev;return 1 ;
@@ -327,7 +335,7 @@ static netdev_tx_t vti_tunnel_xmit(strucmemset (&fl4,0 ,sizeof (fl4));flowi4_init_output (&fl4, tunnel->parms.link, -be32_to_cpu (tunnel->parms.i_key),RT_TOS (tos), +be32_to_cpu (tunnel->parms.o_key),RT_TOS (tos),RT_SCOPE_UNIVERSE ,IPPROTO_IPIP ,0 , dst, tiph->saddr,0 ,0 );
Greg Kroah-Hartman
maintainerPATCH 19/54 l2tp: must disable bh before calling l2tp_xmit_skb()
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit 455cc32bf128e114455d11ad919321ab89a2c312 ]
François Cachereul made a very nice bug report and suspected the bh_lock_sock() / bh_unlok_sock() pair used in l2tp_xmit_skb() from process context was not good.
This problem was added by commit 6af88da14ee284aaad6e4326da09a89191ab6165 ("l2tp: Fix locking in l2tp_core.c").
l2tp_eth_dev_xmit() runs from BH context, so we must disable BH from other l2tp_xmit_skb() users.
[ 452.060011] BUG: soft lockup - CPU#1 stuck for 23s! [accel-pppd:6662] [ 452.061757] Modules linked in: l2tp_ppp l2tp_netlink l2tp_core pppoe pppox ppp_generic slhc ipv6 ext3 mbcache jbd virtio_balloon xfs exportfs dm_mod virtio_blk ata_generic virtio_net floppy ata_piix libata virtio_pci virtio_ring virtio [last unloaded: scsi_wait_scan] [ 452.064012] CPU 1 [ 452.080015] BUG: soft lockup - CPU#2 stuck for 23s! [accel-pppd:6643] [ 452.080015] CPU 2 [ 452.080015] [ 452.080015] Pid: 6643, comm: accel-pppd Not tainted 3.2.46.mini #1 Bochs Bochs [ 452.080015] RIP: 0010:[<ffffffff81059f6c>] [<ffffffff81059f6c>] do_raw_spin_lock+0x17/0x1f [ 452.080015] RSP: 0018:ffff88007125fc18 EFLAGS: 00000293 [ 452.080015] RAX: 000000000000aba9 RBX: ffffffff811d0703 RCX: 0000000000000000 [ 452.080015] RDX: 00000000000000ab RSI: ffff8800711f6896 RDI: ffff8800745c8110 [ 452.080015] RBP: ffff88007125fc18 R08: 0000000000000020 R09: 0000000000000000 [ 452.080015] R10: 0000000000000000 R11: 0000000000000280 R12: 0000000000000286 [ 452.080015] R13: 0000000000000020 R14: 0000000000000240 R15: 0000000000000000 [ 452.080015] FS: 00007fdc0cc24700(0000) GS:ffff8800b6f00000(0000) knlGS:0000000000000000 [ 452.080015] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 452.080015] CR2: 00007fdb054899b8 CR3: 0000000074404000 CR4: 00000000000006a0 [ 452.080015] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 452.080015] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 452.080015] Process accel-pppd (pid: 6643, threadinfo ffff88007125e000, task ffff8800b27e6dd0) [ 452.080015] Stack: [ 452.080015] ffff88007125fc28 ffffffff81256559 ffff88007125fc98 ffffffffa01b2bd1 [ 452.080015] ffff88007125fc58 000000000000000c 00000000029490d0 0000009c71dbe25e [ 452.080015] 000000000000005c 000000080000000e 0000000000000000 ffff880071170600 [ 452.080015] Call Trace: [ 452.080015] [<ffffffff81256559>] _raw_spin_lock+0xe/0x10 [ 452.080015] [<ffffffffa01b2bd1>] l2tp_xmit_skb+0x189/0x4ac [l2tp_core] [ 452.080015] [<ffffffffa01c2d36>] pppol2tp_sendmsg+0x15e/0x19c [l2tp_ppp] [ 452.080015] [<ffffffff811c7872>] __sock_sendmsg_nosec+0x22/0x24 [ 452.080015] [<ffffffff811c83bd>] sock_sendmsg+0xa1/0xb6 [ 452.080015] [<ffffffff81254e88>] ? __schedule+0x5c1/0x616 [ 452.080015] [<ffffffff8103c7c6>] ? __dequeue_signal+0xb7/0x10c [ 452.080015] [<ffffffff810bbd21>] ? fget_light+0x75/0x89 [ 452.080015] [<ffffffff811c8444>] ? sockfd_lookup_light+0x20/0x56 [ 452.080015] [<ffffffff811c9b34>] sys_sendto+0x10c/0x13b [ 452.080015] [<ffffffff8125cac2>] system_call_fastpath+0x16/0x1b [ 452.080015] Code: 81 48 89 e5 72 0c 31 c0 48 81 ff 45 66 25 81 0f 92 c0 5d c3 55 b8 00 01 00 00 48 89 e5 f0 66 0f c1 07 0f b6 d4 38 d0 74 06 f3 90 <8a> 07 eb f6 5d c3 90 90 55 48 89 e5 9c 58 0f 1f 44 00 00 5d c3 [ 452.080015] Call Trace: [ 452.080015] [<ffffffff81256559>] _raw_spin_lock+0xe/0x10 [ 452.080015] [<ffffffffa01b2bd1>] l2tp_xmit_skb+0x189/0x4ac [l2tp_core] [ 452.080015] [<ffffffffa01c2d36>] pppol2tp_sendmsg+0x15e/0x19c [l2tp_ppp] [ 452.080015] [<ffffffff811c7872>] __sock_sendmsg_nosec+0x22/0x24 [ 452.080015] [<ffffffff811c83bd>] sock_sendmsg+0xa1/0xb6 [ 452.080015] [<ffffffff81254e88>] ? __schedule+0x5c1/0x616 [ 452.080015] [<ffffffff8103c7c6>] ? __dequeue_signal+0xb7/0x10c [ 452.080015] [<ffffffff810bbd21>] ? fget_light+0x75/0x89 [ 452.080015] [<ffffffff811c8444>] ? sockfd_lookup_light+0x20/0x56 [ 452.080015] [<ffffffff811c9b34>] sys_sendto+0x10c/0x13b [ 452.080015] [<ffffffff8125cac2>] system_call_fastpath+0x16/0x1b [ 452.064012] [ 452.064012] Pid: 6662, comm: accel-pppd Not tainted 3.2.46.mini #1 Bochs Bochs [ 452.064012] RIP: 0010:[<ffffffff81059f6e>] [<ffffffff81059f6e>] do_raw_spin_lock+0x19/0x1f [ 452.064012] RSP: 0018:ffff8800b6e83ba0 EFLAGS: 00000297 [ 452.064012] RAX: 000000000000aaa9 RBX: ffff8800b6e83b40 RCX: 0000000000000002 [ 452.064012] RDX: 00000000000000aa RSI: 000000000000000a RDI: ffff8800745c8110 [ 452.064012] RBP: ffff8800b6e83ba0 R08: 000000000000c802 R09: 000000000000001c [ 452.064012] R10: ffff880071096c4e R11: 0000000000000006 R12: ffff8800b6e83b18 [ 452.064012] R13: ffffffff8125d51e R14: ffff8800b6e83ba0 R15: ffff880072a589c0 [ 452.064012] FS: 00007fdc0b81e700(0000) GS:ffff8800b6e80000(0000) knlGS:0000000000000000 [ 452.064012] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 452.064012] CR2: 0000000000625208 CR3: 0000000074404000 CR4: 00000000000006a0 [ 452.064012] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 452.064012] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 452.064012] Process accel-pppd (pid: 6662, threadinfo ffff88007129a000, task ffff8800744f7410) [ 452.064012] Stack: [ 452.064012] ffff8800b6e83bb0 ffffffff81256559 ffff8800b6e83bc0 ffffffff8121c64a [ 452.064012] ffff8800b6e83bf0 ffffffff8121ec7a ffff880072a589c0 ffff880071096c62 [ 452.064012] 0000000000000011 ffffffff81430024 ffff8800b6e83c80 ffffffff8121f276 [ 452.064012] Call Trace: [ 452.064012] <IRQ> [ 452.064012] [<ffffffff81256559>] _raw_spin_lock+0xe/0x10 [ 452.064012] [<ffffffff8121c64a>] spin_lock+0x9/0xb [ 452.064012] [<ffffffff8121ec7a>] udp_queue_rcv_skb+0x186/0x269 [ 452.064012] [<ffffffff8121f276>] __udp4_lib_rcv+0x297/0x4ae [ 452.064012] [<ffffffff8121c178>] ? raw_rcv+0xe9/0xf0 [ 452.064012] [<ffffffff8121f4a7>] udp_rcv+0x1a/0x1c [ 452.064012] [<ffffffff811fe385>] ip_local_deliver_finish+0x12b/0x1a5 [ 452.064012] [<ffffffff811fe54e>] ip_local_deliver+0x53/0x84 [ 452.064012] [<ffffffff811fe1d0>] ip_rcv_finish+0x2bc/0x2f3 [ 452.064012] [<ffffffff811fe78f>] ip_rcv+0x210/0x269 [ 452.064012] [<ffffffff8101911e>] ? kvm_clock_get_cycles+0x9/0xb [ 452.064012] [<ffffffff811d88cd>] __netif_receive_skb+0x3a5/0x3f7 [ 452.064012] [<ffffffff811d8eba>] netif_receive_skb+0x57/0x5e [ 452.064012] [<ffffffff811cf30f>] ? __netdev_alloc_skb+0x1f/0x3b [ 452.064012] [<ffffffffa0049126>] virtnet_poll+0x4ba/0x5a4 [virtio_net] [ 452.064012] [<ffffffff811d9417>] net_rx_action+0x73/0x184 [ 452.064012] [<ffffffffa01b2cc2>] ? l2tp_xmit_skb+0x27a/0x4ac [l2tp_core] [ 452.064012] [<ffffffff810343b9>] __do_softirq+0xc3/0x1a8 [ 452.064012] [<ffffffff81013b56>] ? ack_APIC_irq+0x10/0x12 [ 452.064012] [<ffffffff81256559>] ? _raw_spin_lock+0xe/0x10 [ 452.064012] [<ffffffff8125e0ac>] call_softirq+0x1c/0x26 [ 452.064012] [<ffffffff81003587>] do_softirq+0x45/0x82 [ 452.064012] [<ffffffff81034667>] irq_exit+0x42/0x9c [ 452.064012] [<ffffffff8125e146>] do_IRQ+0x8e/0xa5 [ 452.064012] [<ffffffff8125676e>] common_interrupt+0x6e/0x6e [ 452.064012] <EOI> [ 452.064012] [<ffffffff810b82a1>] ? kfree+0x8a/0xa3 [ 452.064012] [<ffffffffa01b2cc2>] ? l2tp_xmit_skb+0x27a/0x4ac [l2tp_core] [ 452.064012] [<ffffffffa01b2c25>] ? l2tp_xmit_skb+0x1dd/0x4ac [l2tp_core] [ 452.064012] [<ffffffffa01c2d36>] pppol2tp_sendmsg+0x15e/0x19c [l2tp_ppp] [ 452.064012] [<ffffffff811c7872>] __sock_sendmsg_nosec+0x22/0x24 [ 452.064012] [<ffffffff811c83bd>] sock_sendmsg+0xa1/0xb6 [ 452.064012] [<ffffffff81254e88>] ? __schedule+0x5c1/0x616 [ 452.064012] [<ffffffff8103c7c6>] ? __dequeue_signal+0xb7/0x10c [ 452.064012] [<ffffffff810bbd21>] ? fget_light+0x75/0x89 [ 452.064012] [<ffffffff811c8444>] ? sockfd_lookup_light+0x20/0x56 [ 452.064012] [<ffffffff811c9b34>] sys_sendto+0x10c/0x13b [ 452.064012] [<ffffffff8125cac2>] system_call_fastpath+0x16/0x1b [ 452.064012] Code: 89 e5 72 0c 31 c0 48 81 ff 45 66 25 81 0f 92 c0 5d c3 55 b8 00 01 00 00 48 89 e5 f0 66 0f c1 07 0f b6 d4 38 d0 74 06 f3 90 8a 07 <eb> f6 5d c3 90 90 55 48 89 e5 9c 58 0f 1f 44 00 00 5d c3 55 48 [ 452.064012] Call Trace: [ 452.064012] <IRQ> [<ffffffff81256559>] _raw_spin_lock+0xe/0x10 [ 452.064012] [<ffffffff8121c64a>] spin_lock+0x9/0xb [ 452.064012] [<ffffffff8121ec7a>] udp_queue_rcv_skb+0x186/0x269 [ 452.064012] [<ffffffff8121f276>] __udp4_lib_rcv+0x297/0x4ae [ 452.064012] [<ffffffff8121c178>] ? raw_rcv+0xe9/0xf0 [ 452.064012] [<ffffffff8121f4a7>] udp_rcv+0x1a/0x1c [ 452.064012] [<ffffffff811fe385>] ip_local_deliver_finish+0x12b/0x1a5 [ 452.064012] [<ffffffff811fe54e>] ip_local_deliver+0x53/0x84 [ 452.064012] [<ffffffff811fe1d0>] ip_rcv_finish+0x2bc/0x2f3 [ 452.064012] [<ffffffff811fe78f>] ip_rcv+0x210/0x269 [ 452.064012] [<ffffffff8101911e>] ? kvm_clock_get_cycles+0x9/0xb [ 452.064012] [<ffffffff811d88cd>] __netif_receive_skb+0x3a5/0x3f7 [ 452.064012] [<ffffffff811d8eba>] netif_receive_skb+0x57/0x5e [ 452.064012] [<ffffffff811cf30f>] ? __netdev_alloc_skb+0x1f/0x3b [ 452.064012] [<ffffffffa0049126>] virtnet_poll+0x4ba/0x5a4 [virtio_net] [ 452.064012] [<ffffffff811d9417>] net_rx_action+0x73/0x184 [ 452.064012] [<ffffffffa01b2cc2>] ? l2tp_xmit_skb+0x27a/0x4ac [l2tp_core] [ 452.064012] [<ffffffff810343b9>] __do_softirq+0xc3/0x1a8 [ 452.064012] [<ffffffff81013b56>] ? ack_APIC_irq+0x10/0x12 [ 452.064012] [<ffffffff81256559>] ? _raw_spin_lock+0xe/0x10 [ 452.064012] [<ffffffff8125e0ac>] call_softirq+0x1c/0x26 [ 452.064012] [<ffffffff81003587>] do_softirq+0x45/0x82 [ 452.064012] [<ffffffff81034667>] irq_exit+0x42/0x9c [ 452.064012] [<ffffffff8125e146>] do_IRQ+0x8e/0xa5 [ 452.064012] [<ffffffff8125676e>] common_interrupt+0x6e/0x6e [ 452.064012] <EOI> [<ffffffff810b82a1>] ? kfree+0x8a/0xa3 [ 452.064012] [<ffffffffa01b2cc2>] ? l2tp_xmit_skb+0x27a/0x4ac [l2tp_core] [ 452.064012] [<ffffffffa01b2c25>] ? l2tp_xmit_skb+0x1dd/0x4ac [l2tp_core] [ 452.064012] [<ffffffffa01c2d36>] pppol2tp_sendmsg+0x15e/0x19c [l2tp_ppp] [ 452.064012] [<ffffffff811c7872>] __sock_sendmsg_nosec+0x22/0x24 [ 452.064012] [<ffffffff811c83bd>] sock_sendmsg+0xa1/0xb6 [ 452.064012] [<ffffffff81254e88>] ? __schedule+0x5c1/0x616 [ 452.064012] [<ffffffff8103c7c6>] ? __dequeue_signal+0xb7/0x10c [ 452.064012] [<ffffffff810bbd21>] ? fget_light+0x75/0x89 [ 452.064012] [<ffffffff811c8444>] ? sockfd_lookup_light+0x20/0x56 [ 452.064012] [<ffffffff811c9b34>] sys_sendto+0x10c/0x13b [ 452.064012] [<ffffffff8125cac2>] system_call_fastpath+0x16/0x1b
--- net/l2tp/l2tp_ppp.c | 4 ++++ 1 file changed, 4 insertions(+)
net/l2tp/l2tp_ppp.c +4 -0
@@ -353,7 +353,9 @@ static int pppol2tp_sendmsg(struct kiocb goto error_put_sess_tun; } +local_bh_disable ();l2tp_xmit_skb (session, skb, session->hdr_len); +local_bh_enable ();sock_put (ps->tunnel_sock);sock_put (sk);
@@ -422,7 +424,9 @@ static int pppol2tp_xmit(struct ppp_chan skb->data[0 ] = ppph[0 ]; skb->data[1 ] = ppph[1 ]; +local_bh_disable ();l2tp_xmit_skb (session, skb, session->hdr_len); +local_bh_enable ();sock_put (sk_tun);sock_put (sk);
Greg Kroah-Hartman
maintainerPATCH 20/54 farsync: fix info leak in ioctl
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: =?UTF-8?q?Salva=20Peir=C3=B3?= <[email protected]>
[ Upstream commit 96b340406724d87e4621284ebac5e059d67b2194 ]
The fst_get_iface() code fails to initialize the two padding bytes of struct sync_serial_settings after the ->loopback member. Add an explicit memset(0) before filling the structure to avoid the info leak.
--- drivers/net/wan/farsync.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wan/farsync.c +1 -0
@@ -1972,6 +1972,7 @@ fst_get_iface(struct fst_card_info *card } i = port->index; +memset (&sync,0 ,sizeof (sync)); sync.clock_rate =FST_RDL (card, portConfig[i].lineSpeed);/* Lucky card and linux use same encoding here */ sync.clock_type = FST_RDB(card, portConfig[i].internalClock) ==
Greg Kroah-Hartman
maintainerPATCH 21/54 unix_diag: fix info leak
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mathias Krause <[email protected]>
[ Upstream commit 6865d1e834be84ddd5808d93d5035b492346c64a ]
When filling the netlink message we miss to wipe the pad field, therefore leak one byte of heap memory to userland. Fix this by setting pad to 0.
--- net/unix/diag.c | 1 + 1 file changed, 1 insertion(+)
net/unix/diag.c +1 -0
@@ -124,6 +124,7 @@ static int sk_diag_fill(struct sock *sk, rep->udiag_family =AF_UNIX ; rep->udiag_type = sk->sk_type; rep->udiag_state = sk->sk_state; + rep->pad =0 ; rep->udiag_ino = sk_ino;sock_diag_save_cookie (sk, rep->udiag_cookie);
Greg Kroah-Hartman
maintainerPATCH 22/54 connector: use nlmsg_len() to check message length
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mathias Krause <[email protected]>
[ Upstream commit 162b2bedc084d2d908a04c93383ba02348b648b0 ]
The current code tests the length of the whole netlink message to be at least as long to fit a cn_msg. This is wrong as nlmsg_len includes the length of the netlink message header. Use nlmsg_len() instead to fix this "off-by-NLMSG_HDRLEN" size check.
--- drivers/connector/connector.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/connector/connector.c +4 -3
@@ -157,17 +157,18 @@ static int cn_call_callback(struct sk_bustatic void cn_rx_skb (struct sk_buff *__skb) {struct nlmsghdr *nlh; -int err;struct sk_buff *skb; +int len, err; skb =skb_get (__skb);if (skb->len >=NLMSG_HDRLEN ) { nlh =nlmsg_hdr (skb); + len =nlmsg_len (nlh); -if (nlh->nlmsg_len <sizeof (struct cn_msg ) || +if (len < (int )sizeof (struct cn_msg ) || skb->len < nlh->nlmsg_len || - nlh->nlmsg_len >CONNECTOR_MAX_MSG_SIZE ) { + len >CONNECTOR_MAX_MSG_SIZE ) {kfree_skb (skb);return ; }
Greg Kroah-Hartman
maintainerPATCH 23/54 bnx2x: record rx queue for LRO packets
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit 60e66fee56b2256dcb1dc2ea1b2ddcb6e273857d ]
RPS support is kind of broken on bnx2x, because only non LRO packets get proper rx queue information. This triggers reorders, as it seems bnx2x like to generate a non LRO packet for segment including TCP PUSH flag : (this might be pure coincidence, but all the reorders I've seen involve segments with a PUSH)
11:13:34.335847 IP A > B: . 415808:447136(31328) ack 1 win 457 <nop,nop,timestamp 3789336 3985797> 11:13:34.335992 IP A > B: . 447136:448560(1424) ack 1 win 457 <nop,nop,timestamp 3789336 3985797> 11:13:34.336391 IP A > B: . 448560:479888(31328) ack 1 win 457 <nop,nop,timestamp 3789337 3985797> 11:13:34.336425 IP A > B: P 511216:512640(1424) ack 1 win 457 <nop,nop,timestamp 3789337 3985798> 11:13:34.336423 IP A > B: . 479888:511216(31328) ack 1 win 457 <nop,nop,timestamp 3789337 3985798> 11:13:34.336924 IP A > B: . 512640:543968(31328) ack 1 win 457 <nop,nop,timestamp 3789337 3985798> 11:13:34.336963 IP A > B: . 543968:575296(31328) ack 1 win 457 <nop,nop,timestamp 3789337 3985798>
We must call skb_record_rx_queue() to properly give to RPS (and more generally for TX queue selection on forward path) the receive queue information.
Similar fix is needed for skb_mark_napi_id(), but will be handled in a separate patch to ease stable backports.
--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +1 -0
@@ -670,6 +670,7 @@ static void bnx2x_gro_receive(struct bnx } }#endif +skb_record_rx_queue (skb, fp->rx_queue);napi_gro_receive (&fp->napi, skb); }
Greg Kroah-Hartman
maintainerPATCH 24/54 virtio-net: dont respond to cpu hotplug notifier if were not ready
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jason Wang <[email protected]>
[ Upstream commit 3ab098df35f8b98b6553edc2e40234af512ba877 ]
We're trying to re-configure the affinity unconditionally in cpu hotplug callback. This may lead the issue during resuming from s3/s4 since
- virt queues haven't been allocated at that time.
- it's unnecessary since thaw method will re-configure the affinity.
Fix this issue by checking the config_enable and do nothing is we're not ready.
The bug were introduced by commit 8de4b2f3ae90c8fc0f17eeaab87d5a951b66ee17 (virtio-net: reset virtqueue affinity when doing cpu hotplug).
--- drivers/net/virtio_net.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/net/virtio_net.c +8 -0
@@ -1097,6 +1097,11 @@ 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 :
@@ -1109,6 +1114,9 @@ static int virtnet_cpu_callback(struct ndefault :break ; } + +done: +mutex_unlock (&vi->config_lock);return NOTIFY_OK ; }
Greg Kroah-Hartman
maintainerPATCH 25/54 virtio-net: fix the race between channels setting and refill
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jason Wang <[email protected]>
[ Upstream commit 9b9cd8024a2882e896c65222aa421d461354e3f2 ]
Commit 55257d72bd1c51f25106350f4983ec19f62ed1fa (virtio-net: fill only rx queues which are being used) tries to refill on demand when changing the number of channels by call try_refill_recv() directly, this may race:
- the refill work who may do the refill in the same time
- the try_refill_recv() called in bh since napi was not disabled
Which may led guest complain during setting channels:
virtio_net virtio0: input.1:id 0 is not a head!
Solve this issue by scheduling a refill work which can guarantee the serialization of refill.
--- drivers/net/virtio_net.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/net/virtio_net.c +1 -4
@@ -902,7 +902,6 @@ static int virtnet_set_queues(struct virstruct scatterlist sg;struct virtio_net_ctrl_mq s;struct net_device *dev = vi->dev; -int i;if (!vi->has_cvq || !virtio_has_feature (vi->vdev,VIRTIO_NET_F_MQ ))return 0 ;
@@ -916,10 +915,8 @@ static int virtnet_set_queues(struct vir queue_pairs);return -EINVAL ; }else { -for (i = vi->curr_queue_pairs; i < queue_pairs; i++) -if (!try_fill_recv (&vi->rq[i],GFP_KERNEL )) -schedule_delayed_work (&vi->refill,0 ); vi->curr_queue_pairs = queue_pairs; +schedule_delayed_work (&vi->refill,0 ); }return 0 ;
Greg Kroah-Hartman
maintainerPATCH 26/54 virtio-net: refill only when device is up during setting queues
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jason Wang <[email protected]>
[ Upstream commit 35ed159bfd96a7547ec277ed8b550c7cbd9841b6 ]
We used to schedule the refill work unconditionally after changing the number of queues. This may lead an issue if the device is not up. Since we only try to cancel the work in ndo_stop(), this may cause the refill work still work after removing the device. Fix this by only schedule the work when device is up.
The bug were introduce by commit 9b9cd8024a2882e896c65222aa421d461354e3f2. (virtio-net: fix the race between channels setting and refill)
--- drivers/net/virtio_net.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/net/virtio_net.c +5 -1
@@ -916,7 +916,9 @@ static int virtnet_set_queues(struct virreturn -EINVAL ; }else { vi->curr_queue_pairs = queue_pairs; -schedule_delayed_work (&vi->refill,0 ); +/* virtnet_open() will refill when device is going to up. */ +if (dev->flags &IFF_UP ) +schedule_delayed_work (&vi->refill,0 ); }return 0 ;
@@ -1714,7 +1716,9 @@ static int virtnet_restore(struct virtio vi->config_enable = true;mutex_unlock (&vi->config_lock); +rtnl_lock ();virtnet_set_queues (vi, vi->curr_queue_pairs); +rtnl_unlock ();return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 27/54 bridge: Correctly clamp MAX forward_delay when enabling STP
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vlad Yasevich <[email protected]>
[ Upstream commit 4b6c7879d84ad06a2ac5b964808ed599187a188d ]
Commit be4f154d5ef0ca147ab6bcd38857a774133f5450
bridge: Clamp forward_delay when enabling STP
had a typo when attempting to clamp maximum forward delay.
It is possible to set bridge_forward_delay to be higher then permitted maximum when STP is off. When turning STP on, the higher then allowed delay has to be clamed down to max value.
--- net/bridge/br_stp_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/bridge/br_stp_if.c +1 -1
@@ -134,7 +134,7 @@ static void br_stp_start(struct net_bridif (br->bridge_forward_delay <BR_MIN_FORWARD_DELAY )__br_set_forward_delay (br,BR_MIN_FORWARD_DELAY ); -else if (br->bridge_forward_delay <BR_MAX_FORWARD_DELAY ) +else if (br->bridge_forward_delay >BR_MAX_FORWARD_DELAY )__br_set_forward_delay (br,BR_MAX_FORWARD_DELAY );if (r ==0 ) {
Greg Kroah-Hartman
maintainerPATCH 28/54 net: dst: provide accessor function to dst->xfrm
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vlad Yasevich <[email protected]>
[ Upstream commit e87b3998d795123b4139bc3f25490dd236f68212 ]
dst->xfrm is conditionally defined. Provide accessor funtion that is always available.
--- include/net/dst.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)
include/net/dst.h +12 -0
@@ -477,10 +477,22 @@ static inline struct dst_entry *xfrm_loo {return dst_orig; } + +static inline struct xfrm_state *dst_xfrm (const struct dst_entry *dst) +{ +return NULL ; +} +#else extern struct dst_entry *xfrm_lookup (struct net *net,struct dst_entry *dst_orig,const struct flowi *fl,struct sock *sk,int flags); + +/* skb attached with this dst needs transformation if dst->xfrm is valid */ +static inline struct xfrm_state *dst_xfrm (const struct dst_entry *dst) +{ +return dst->xfrm; +}#endif #endif /* _NET_DST_H */
Greg Kroah-Hartman
maintainerPATCH 29/54 sctp: Use software crc32 checksum when xfrm transform will happen.
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fan Du <[email protected]>
[ Upstream commit 27127a82561a2a3ed955ce207048e1b066a80a2a ]
igb/ixgbe have hardware sctp checksum support, when this feature is enabled and also IPsec is armed to protect sctp traffic, ugly things happened as xfrm_output checks CHECKSUM_PARTIAL to do checksum operation(sum every thing up and pack the 16bits result in the checksum field). The result is fail establishment of sctp communication.
--- net/sctp/output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/sctp/output.c +2 -1
@@ -547,7 +547,8 @@ int sctp_packet_transmit(struct sctp_pac* by CRC32-C as described in <draft-ietf-tsvwg-sctpcsum-02.txt>. */ if (!sctp_checksum_disable) { -if (!(dst->dev->features &NETIF_F_SCTP_CSUM )) { +if (!(dst->dev->features &NETIF_F_SCTP_CSUM ) || + (dst_xfrm (dst) !=NULL )) {__u32 crc32 =sctp_start_cksum ((__u8 *)sh, cksum_buf_len);/* 3) Put the resultant value into the checksum field in the
Greg Kroah-Hartman
maintainerPATCH 30/54 sctp: Perform software checksum if packet has to be fragmented.
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vlad Yasevich <[email protected]>
[ Upstream commit d2dbbba77e95dff4b4f901fee236fef6d9552072 ]
IP/IPv6 fragmentation knows how to compute only TCP/UDP checksum. This causes problems if SCTP packets has to be fragmented and ipsummed has been set to PARTIAL due to checksum offload support. This condition can happen when retransmitting after MTU discover, or when INIT or other control chunks are larger then MTU. Check for the rare fragmentation condition in SCTP and use software checksum calculation in this case.
--- net/sctp/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/sctp/output.c +1 -1
@@ -548,7 +548,7 @@ int sctp_packet_transmit(struct sctp_pac*/ if (!sctp_checksum_disable) {if (!(dst->dev->features &NETIF_F_SCTP_CSUM ) || - (dst_xfrm (dst) !=NULL )) { + (dst_xfrm (dst) !=NULL ) || packet->ipfragok) {__u32 crc32 =sctp_start_cksum ((__u8 *)sh, cksum_buf_len);/* 3) Put the resultant value into the checksum field in the
Greg Kroah-Hartman
maintainerPATCH 31/54 wanxl: fix info leak in ioctl
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Salva Peiró <[email protected]>
[ Upstream commit 2b13d06c9584b4eb773f1e80bbaedab9a1c344e1 ]
The wanxl_ioctl() code fails to initialize the two padding bytes of struct sync_serial_settings after the ->loopback member. Add an explicit memset(0) before filling the structure to avoid the info leak.
--- drivers/net/wan/wanxl.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wan/wanxl.c +1 -0
@@ -355,6 +355,7 @@ static int wanxl_ioctl(struct net_device ifr->ifr_settings.size = size;/* data size wanted */ return -ENOBUFS ; } +memset (&line,0 ,sizeof (line)); line.clock_type =get_status (port)->clocking; line.clock_rate =0 ; line.loopback =0 ;
Greg Kroah-Hartman
maintainerPATCH 32/54 be2net: pass if_id for v1 and V2 versions of TX_CREATE cmd
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vasundhara Volam <[email protected]>
[ Upstream commit 0fb88d61bc60779dde88b0fc268da17eb81d0412 ]
It is a required field for all TX_CREATE cmd versions > 0.
This fixes a driver initialization failure, caused by recent SH-R Firmwares (versions > 10.0.639.0) failing the TX_CREATE cmd when if_id field is not passed.
--- drivers/net/ethernet/emulex/benet/be_cmds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/emulex/benet/be_cmds.c +2 -1
@@ -1150,7 +1150,6 @@ int be_cmd_txq_create(struct be_adapterif (lancer_chip (adapter)) { req->hdr.version =1 ; - req->if_id =cpu_to_le16 (adapter->if_handle); }else if (BEx_chip (adapter)) {if (adapter->function_caps &BE_FUNCTION_CAPS_SUPER_NIC ) req->hdr.version =2 ;
@@ -1158,6 +1157,8 @@ int be_cmd_txq_create(struct be_adapter req->hdr.version =2 ; } +if (req->hdr.version >0 ) + req->if_id =cpu_to_le16 (adapter->if_handle); req->num_pages =PAGES_4K_SPANNED (q_mem->va, q_mem->size); req->ulp_num =BE_ULP1_NUM ; req->type =BE_ETH_TX_RING_TYPE_STANDARD ;
Greg Kroah-Hartman
maintainerPATCH 33/54 net: unix: inherit SOCK_PASS{CRED, SEC} flags from socket to fix race
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Borkmann <[email protected]>
[ Upstream commit 90c6bd34f884cd9cee21f1d152baf6c18bcac949 ]
In the case of credentials passing in unix stream sockets (dgram sockets seem not affected), we get a rather sparse race after commit 16e5726 ("af_unix: dont send SCM_CREDENTIALS by default").
We have a stream server on receiver side that requests credential passing from senders (e.g. nc -U). Since we need to set SO_PASSCRED on each spawned/accepted socket on server side to 1 first (as it's not inherited), it can happen that in the time between accept() and setsockopt() we get interrupted, the sender is being scheduled and continues with passing data to our receiver. At that time SO_PASSCRED is neither set on sender nor receiver side, hence in cmsg's SCM_CREDENTIALS we get eventually pid:0, uid:65534, gid:65534 (== overflow{u,g}id) instead of what we actually would like to see.
On the sender side, here nc -U, the tests in maybe_add_creds() invoked through unix_stream_sendmsg() would fail, as at that exact time, as mentioned, the sender has neither SO_PASSCRED on his side nor sees it on the server side, and we have a valid 'other' socket in place. Thus, sender believes it would just look like a normal connection, not needing/requesting SO_PASSCRED at that time.
As reverting 16e5726 would not be an option due to the significant performance regression reported when having creds always passed, one way/trade-off to prevent that would be to set SO_PASSCRED on the listener socket and allow inheriting these flags to the spawned socket on server side in accept(). It seems also logical to do so if we'd tell the listener socket to pass those flags onwards, and would fix the race.
Before, strace:
recvmsg(4, {msg_name(0)=NULL, msg_iov(1)=[{"blub\n", 4096}],
msg_controllen=32, {cmsg_len=28, cmsg_level=SOL_SOCKET,
cmsg_type=SCM_CREDENTIALS{pid=0, uid=65534, gid=65534}},
msg_flags=0}, 0) = 5After, strace:
recvmsg(4, {msg_name(0)=NULL, msg_iov(1)=[{"blub\n", 4096}],
msg_controllen=32, {cmsg_len=28, cmsg_level=SOL_SOCKET,
cmsg_type=SCM_CREDENTIALS{pid=11580, uid=1000, gid=1000}},
msg_flags=0}, 0) = 5--- net/unix/af_unix.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
net/unix/af_unix.c +10 -0
@@ -1245,6 +1245,15 @@ static int unix_socketpair(struct socketreturn 0 ; } +static void unix_sock_inherit_flags (const struct socket *old, +struct socket *new) +{ +if (test_bit (SOCK_PASSCRED , &old->flags)) +set_bit (SOCK_PASSCRED , &new->flags); +if (test_bit (SOCK_PASSSEC , &old->flags)) +set_bit (SOCK_PASSSEC , &new->flags); +} +static int unix_accept (struct socket *sock,struct socket *newsock,int flags) {struct sock *sk = sock->sk;
@@ -1279,6 +1288,7 @@ static int unix_accept(struct socket *so/* attach accepted sock to socket */ unix_state_lock (tsk); newsock->state =SS_CONNECTED ; +unix_sock_inherit_flags (sock, newsock);sock_graft (tsk, newsock);unix_state_unlock (tsk);return 0 ;
Greg Kroah-Hartman
maintainerPATCH 34/54 net: fix cipso packet validation when !NETLABEL
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Seif Mazareeb <[email protected]>
[ Upstream commit f2e5ddcc0d12f9c4c7b254358ad245c9dddce13b ]
When CONFIG_NETLABEL is disabled, the cipso_v4_validate() function could loop forever in the main loop if opt[opt_iter +1] == 0, this will causing a kernel crash in an SMP system, since the CPU executing this function will stall /not respond to IPIs.
This problem can be reproduced by running the IP Stack Integrity Checker
(http://isic.sourceforge.net) using the following command on a Linux machine connected to DUT:
"icmpsic -s rand -d <DUT IP address> -r 123456"
wait (1-2 min)
--- include/net/cipso_ipv4.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
include/net/cipso_ipv4.h +4 -2
@@ -290,6 +290,7 @@ static inline int cipso_v4_validate(consunsigned char err_offset =0 ;u8 opt_len = opt[1 ];u8 opt_iter; +u8 tag_len;if (opt_len <8 ) { err_offset =1 ;
@@ -302,11 +303,12 @@ static inline int cipso_v4_validate(cons }for (opt_iter =6 ; opt_iter < opt_len;) { -if (opt[opt_iter +1 ] > (opt_len - opt_iter)) { + tag_len = opt[opt_iter +1 ]; +if ((tag_len ==0 ) || (opt[opt_iter +1 ] > (opt_len - opt_iter))) { err_offset = opt_iter +1 ; goto out; } - opt_iter += opt[opt_iter +1 ]; + opt_iter += tag_len; } out:
Greg Kroah-Hartman
maintainerPATCH 35/54 inet: fix possible memory corruption with UDP_CORK and UFO
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hannes Frederic Sowa <[email protected]>
[ This is a simplified -stable version of a set of upstream commits. ]
This is a replacement patch only for stable which does fix the problems handled by the following two commits in -net:
"ip_output: do skb ufo init for peeked non ufo skb as well" (e93b7d748be887cd7639b113ba7d7ef792a7efb9) "ip6_output: do skb ufo init for peeked non ufo skb as well" (c547dbf55d5f8cf615ccc0e7265e98db27d3fb8b)
Three frames are written on a corked udp socket for which the output netdevice has UFO enabled. If the first and third frame are smaller than the mtu and the second one is bigger, we enqueue the second frame with skb_append_datato_frags without initializing the gso fields. This leads to the third frame appended regulary and thus constructing an invalid skb.
This fixes the problem by always using skb_append_datato_frags as soon as the first frag got enqueued to the skb without marking the packet as SKB_GSO_UDP.
The problem with only two frames for ipv6 was fixed by "ipv6: udp packets following an UFO enqueued packet need also be handled by UFO" (2811ebac2521ceac84f2bdae402455baa6a7fb47).
--- include/linux/skbuff.h | 5 +++++ net/ipv4/ip_output.c | 2 +- net/ipv6/ip6_output.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-)
include/linux/skbuff.h +5 -0
@@ -1308,6 +1308,11 @@ static inline int skb_pagelen(const strureturn len +skb_headlen (skb); } +static inline bool skb_has_frags (const struct sk_buff *skb) +{ +return skb_shinfo (skb)->nr_frags; +} +/** * __skb_fill_page_desc - initialise a paged fragment in an skb * @skb: buffer containing fragment to be initialised
net/ipv4/ip_output.c +1 -1
@@ -844,7 +844,7 @@ static int __ip_append_data(struct sock csummode =CHECKSUM_PARTIAL ; cork->length += length; -if (((length > mtu) || (skb &&skb_is_gso (skb))) && +if (((length > mtu) || (skb &&skb_has_frags (skb))) && (sk->sk_protocol ==IPPROTO_UDP ) && (rt->dst.dev->features &NETIF_F_UFO ) && !rt->dst.header_len) { err = ip_ufo_append_data(sk, queue, getfrag, from, length,
net/ipv6/ip6_output.c +1 -1
@@ -1250,7 +1250,7 @@ int ip6_append_data(struct sock *sk, int skb =skb_peek_tail (&sk->sk_write_queue); cork->length += length;if (((length > mtu) || - (skb &&skb_is_gso (skb))) && + (skb &&skb_has_frags (skb))) && (sk->sk_protocol ==IPPROTO_UDP ) && (rt->dst.dev->features &NETIF_F_UFO )) { err = ip6_ufo_append_data(sk, getfrag, from, length,
Greg Kroah-Hartman
maintainerPATCH 36/54 ipv6: always prefer rt6i_gateway if present
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Julian Anastasov <[email protected]>
[ Upstream commit 96dc809514fb2328605198a0602b67554d8cce7b ]
In v3.9 6fd6ce2056de2709 ("ipv6: Do not depend on rt->n in ip6_finish_output2()." changed the behaviour of ip6_finish_output2() such that the recently introduced rt6_nexthop() is used instead of an assigned neighbor.
As rt6_nexthop() prefers rt6i_gateway only for gatewayed routes this causes a problem for users like IPVS, xt_TEE and RAW(hdrincl) if they want to use different address for routing compared to the destination address.
Another case is when redirect can create RTF_DYNAMIC route without RTF_GATEWAY flag, we ignore the rt6i_gateway in rt6_nexthop().
Fix the above problems by considering the rt6i_gateway if present, so that traffic routed to address on local subnet is not wrongly diverted to the destination address.
Thanks to Simon Horman and Phil Oester for spotting the problematic commit.
Thanks to Hannes Frederic Sowa for his review and help in testing.
--- include/net/ip6_route.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/net/ip6_route.h +1 -1
@@ -196,7 +196,7 @@ static inline int ip6_skb_dst_mtu(structstatic inline struct in6_addr *rt6_nexthop (struct rt6_info *rt,struct in6_addr *dest) { -if (rt->rt6i_flags &RTF_GATEWAY ) +if (rt->rt6i_flags &RTF_GATEWAY || !ipv6_addr_any (&rt->rt6i_gateway))return &rt->rt6i_gateway;return dest; }
Greg Kroah-Hartman
maintainerPATCH 37/54 ipv6: fill rt6i_gateway with nexthop address
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Julian Anastasov <[email protected]>
[ Upstream commit 550bab42f83308c9d6ab04a980cc4333cef1c8fa ]
Make sure rt6i_gateway contains nexthop information in all routes returned from lookup or when routes are directly attached to skb for generated ICMP packets.
The effect of this patch should be a faster version of rt6_nexthop() and the consideration of local addresses as nexthop.
--- include/net/ip6_route.h | 6 ++---- net/ipv6/ip6_output.c | 4 ++-- net/ipv6/route.c | 8 ++++++-- 3 files changed, 10 insertions(+), 8 deletions(-)
include/net/ip6_route.h +2 -4
@@ -194,11 +194,9 @@ static inline int ip6_skb_dst_mtu(struct skb_dst(skb)->dev->mtu : dst_mtu(skb_dst(skb)); } -static inline struct in6_addr *rt6_nexthop (struct rt6_info *rt,struct in6_addr *dest) +static inline struct in6_addr *rt6_nexthop (struct rt6_info *rt) { -if (rt->rt6i_flags &RTF_GATEWAY || !ipv6_addr_any (&rt->rt6i_gateway)) -return &rt->rt6i_gateway; -return dest; +return &rt->rt6i_gateway; }#endif
net/ipv6/ip6_output.c +2 -2
@@ -130,7 +130,7 @@ static int ip6_finish_output2(struct sk_ }rcu_read_lock_bh (); - nexthop =rt6_nexthop ((struct rt6_info *)dst, &ipv6_hdr (skb)->daddr); + nexthop =rt6_nexthop ((struct rt6_info *)dst); neigh =__ipv6_neigh_lookup_noref (dst->dev, nexthop);if (unlikely (!neigh)) neigh =__neigh_create (&nd_tbl, nexthop, dst->dev, false);
@@ -898,7 +898,7 @@ static int ip6_dst_lookup_tail(struct so*/ rt = (struct rt6_info *) *dst;rcu_read_lock_bh (); - n =__ipv6_neigh_lookup_noref (rt->dst.dev,rt6_nexthop (rt, &fl6->daddr)); + n =__ipv6_neigh_lookup_noref (rt->dst.dev,rt6_nexthop (rt)); err = n && !(n->nud_state &NUD_VALID ) ? -EINVAL :0 ;rcu_read_unlock_bh ();
net/ipv6/route.c +6 -2
@@ -848,7 +848,6 @@ static struct rt6_info *rt6_alloc_cow(stif (ort->rt6i_dst.plen !=128 &&ipv6_addr_equal (&ort->rt6i_dst.addr, daddr)) rt->rt6i_flags |=RTF_ANYCAST ; - rt->rt6i_gateway = *daddr; } rt->rt6i_flags |=RTF_CACHE ;
@@ -1245,6 +1244,7 @@ struct dst_entry *icmp6_dst_alloc(struct rt->dst.flags |=DST_HOST ; rt->dst.output = ip6_output;atomic_set (&rt->dst.__refcnt,1 ); + rt->rt6i_gateway = fl6->daddr; rt->rt6i_dst.addr = fl6->daddr; rt->rt6i_dst.plen =128 ; rt->rt6i_idev = idev;
@@ -1801,7 +1801,10 @@ static struct rt6_info *ip6_rt_copy(struin6_dev_hold (rt->rt6i_idev); rt->dst.lastuse = jiffies; - rt->rt6i_gateway = ort->rt6i_gateway; +if (ort->rt6i_flags &RTF_GATEWAY ) + rt->rt6i_gateway = ort->rt6i_gateway; +else + rt->rt6i_gateway = *dest; rt->rt6i_flags = ort->rt6i_flags;if ((ort->rt6i_flags & (RTF_DEFAULT |RTF_ADDRCONF )) == (RTF_DEFAULT |RTF_ADDRCONF ))
@@ -2088,6 +2091,7 @@ struct rt6_info *addrconf_dst_alloc(struelse rt->rt6i_flags |=RTF_LOCAL ; + rt->rt6i_gateway = *addr; rt->rt6i_dst.addr = *addr; rt->rt6i_dst.plen =128 ; rt->rt6i_table =fib6_get_table (net,RT6_TABLE_LOCAL );
Greg Kroah-Hartman
maintainerPATCH 38/54 netfilter: nf_conntrack: fix rt6i_gateway checks for H.323 helper
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Julian Anastasov <[email protected]>
[ Upstream commit 56e42441ed54b092d6c7411138ce60d049e7c731 ]
Now when rt6_nexthop() can return nexthop address we can use it for proper nexthop comparison of directly connected destinations. For more information refer to commit bbb5823cf742a7 ("netfilter: nf_conntrack: fix rt_gateway checks for H.323 helper").
--- net/netfilter/nf_conntrack_h323_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/netfilter/nf_conntrack_h323_main.c +2 -2
@@ -778,8 +778,8 @@ static int callforward_do_filter(const u flowi6_to_flowi(&fl1), false)) {if (!afinfo->route (&init_net, (struct dst_entry **)&rt2,flowi6_to_flowi (&fl2), false)) { -if (!memcmp (&rt1->rt6i_gateway, &rt2->rt6i_gateway, -sizeof (rt1->rt6i_gateway)) && +if (ipv6_addr_equal (rt6_nexthop (rt1), +rt6_nexthop (rt2)) && rt1->dst.dev == rt2->dst.dev) ret =1 ;dst_release (&rt2->dst);
Greg Kroah-Hartman
maintainerPATCH 39/54 ipv6: probe routes asynchronous in rt6_probe
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hannes Frederic Sowa <[email protected]>
[ Upstream commit c2f17e827b419918c856131f592df9521e1a38e3 ]
Routes need to be probed asynchronous otherwise the call stack gets exhausted when the kernel attemps to deliver another skb inline, like e.g. xt_TEE does, and we probe at the same time.
We update neigh->updated still at once, otherwise we would send to many probes.
--- net/ipv6/route.c | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-)
net/ipv6/route.c +31 -7
@@ -473,6 +473,24 @@ out: }#ifdef CONFIG_IPV6_ROUTER_PREF +struct __rt6_probe_work { +struct work_struct work; +struct in6_addr target; +struct net_device *dev; +}; + +static void rt6_probe_deferred (struct work_struct *w) +{ +struct in6_addr mcaddr; +struct __rt6_probe_work *work = + container_of(w, struct __rt6_probe_work, work); + +addrconf_addr_solict_mult (&work->target, &mcaddr); +ndisc_send_ns (work->dev,NULL , &work->target, &mcaddr,NULL ); +dev_put (work->dev); +kfree (w); +} +static void rt6_probe (struct rt6_info *rt) {struct neighbour *neigh;
@@ -496,17 +514,23 @@ static void rt6_probe(struct rt6_info *rif (!neigh ||time_after (jiffies, neigh->updated + rt->rt6i_idev->cnf.rtr_probe_interval)) { -struct in6_addr mcaddr; -struct in6_addr *target; +struct __rt6_probe_work *work; -if (neigh) { + work =kmalloc (sizeof (*work),GFP_ATOMIC ); + +if (neigh && work) neigh->updated = jiffies; + +if (neigh)write_unlock (&neigh->lock); - } - target = (struct in6_addr *)&rt->rt6i_gateway; -addrconf_addr_solict_mult (target, &mcaddr); -ndisc_send_ns (rt->dst.dev,NULL , target, &mcaddr,NULL ); +if (work) { +INIT_WORK (&work->work, rt6_probe_deferred); + work->target = rt->rt6i_gateway; +dev_hold (rt->dst.dev); + work->dev = rt->dst.dev; +schedule_work (&work->work); + } }else { out:write_unlock (&neigh->lock);
Greg Kroah-Hartman
maintainerPATCH 40/54 davinci_emac.c: Fix IFF_ALLMULTI setup
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mariusz Ceier <[email protected]>
[ Upstream commit d69e0f7ea95fef8059251325a79c004bac01f018 ]
When IFF_ALLMULTI flag is set on interface and IFF_PROMISC isn't, emac_dev_mcast_set should only enable RX of multicasts and reset MACHASH registers.
It does this, but afterwards it either sets up multicast MACs filtering or disables RX of multicasts and resets MACHASH registers again, rendering IFF_ALLMULTI flag useless.
This patch fixes emac_dev_mcast_set, so that multicast MACs filtering and disabling of RX of multicasts are skipped when IFF_ALLMULTI flag is set.
Tested with kernel 2.6.37.
--- drivers/net/ethernet/ti/davinci_emac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/ti/davinci_emac.c +1 -2
@@ -876,8 +876,7 @@ static void emac_dev_mcast_set(struct ne netdev_mc_count(ndev) > EMAC_DEF_MAX_MULTICAST_ADDRESSES) { mbp_enable = (mbp_enable |EMAC_MBP_RXMCAST );emac_add_mcast (priv,EMAC_ALL_MULTI_SET ,NULL ); - } -if (!netdev_mc_empty (ndev)) { + } else if (!netdev_mc_empty(ndev)) {struct netdev_hw_addr *ha; mbp_enable = (mbp_enable |EMAC_MBP_RXMCAST );
Greg Kroah-Hartman
maintainerPATCH 41/54 ARM: 7851/1: check for number of arguments in syscall_get/set_arguments()
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: AKASHI Takahiro <[email protected]>
commit 3c1532df5c1b54b5f6246cdef94eeb73a39fe43a upstream.
In ftrace_syscall_enter(),
syscall_get_arguments(..., 0, n, ...)
if (i == 0) { <handle ORIG_r0> ...; n--;}
memcpy(..., n * sizeof(args[0]));If 'number of arguments(n)' is zero and 'argument index(i)' is also zero in syscall_get_arguments(), none of arguments should be copied by memcpy(). Otherwise 'n--' can be a big positive number and unexpected amount of data will be copied. Tracing system calls which take no argument, say sync(void), may hit this case and eventually make the system corrupted.
This patch fixes the issue both in syscall_get_arguments() and syscall_set_arguments().
--- arch/arm/include/asm/syscall.h | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/include/asm/syscall.h +6 -0
@@ -57,6 +57,9 @@ static inline void syscall_get_arguments unsigned int i, unsigned int n, unsigned long *args) { + if (n == 0) + return; +if (i + n >SYSCALL_MAX_ARGS ) {unsigned long *args_bad = args +SYSCALL_MAX_ARGS - i;unsigned int n_bad = n + i -SYSCALL_MAX_ARGS ;
@@ -81,6 +84,9 @@ static inline void syscall_set_arguments unsigned int i, unsigned int n, const unsigned long *args) { + if (n == 0) + return; +if (i + n >SYSCALL_MAX_ARGS ) {pr_warning ("%s called with max args %d, handling only %d\n" , __func__, i + n,SYSCALL_MAX_ARGS );
Greg Kroah-Hartman
maintainerPATCH 42/54 ARM: integrator: deactivate timer0 on the Integrator/CP
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Walleij <[email protected]>
commit 29114fd7db2fc82a34da8340d29b8fa413e03dca upstream.
This fixes a long-standing Integrator/CP regression from commit 870e2928cf3368ca9b06bc925d0027b0a56bcd8e "ARM: integrator-cp: convert use CLKSRC_OF for timer init"
When this code was introduced, the both aliases pointing the system to use timer1 as primary (clocksource) and timer2 as secondary (clockevent) was ignored, and the system would simply use the first two timers found as clocksource and clockevent.
However this made the system timeline accelerate by a factor x25, as it turns out that the way the clocking actually works (totally undocumented and found after some trial-and-error) is that timer0 runs @ 25MHz and timer1 and timer2 runs @ 1MHz. Presumably this divider setting is a boot-on default and configurable albeit the way to configure it is not documented.
So as a quick fix to the problem, let's mark timer0 as disabled, so the code will chose timer1 and timer2 as it used to.
This also deletes the two aliases for the primary and secondary timer as they have been superceded by the auto-selection
--- arch/arm/boot/dts/integratorcp.dts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
arch/arm/boot/dts/integratorcp.dts +4 -5
@@ -9,11 +9,6 @@ model = "ARM Integrator/CP"; compatible = "arm,integrator-cp"; - aliases { - arm,timer-primary = &timer2; - arm,timer-secondary = &timer1; - }; - chosen { bootargs = "root=/dev/ram0 console=ttyAMA0,38400n8 earlyprintk"; };
@@ -24,14 +19,18 @@ }; timer0: timer@13000000 { + /* TIMER0 runs @ 25MHz */ compatible = "arm,integrator-cp-timer"; + status = "disabled"; }; timer1: timer@13000100 { + /* TIMER1 runs @ 1MHz */ compatible = "arm,integrator-cp-timer"; }; timer2: timer@13000200 { + /* TIMER2 runs @ 1MHz */ compatible = "arm,integrator-cp-timer"; };
Greg Kroah-Hartman
maintainerPATCH 43/54 gpio/lynxpoint: check if the interrupt is enabled in IRQ handler
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mika Westerberg <[email protected]>
commit 03d152d5582abc8a1c19cb107164c3724bbd4be4 upstream.
Checking LP_INT_STAT is not enough in the interrupt handler because its contents get updated regardless of whether the pin has interrupt enabled or not. This causes the driver to loop forever for GPIOs that are pulled up.
Fix this by checking the interrupt enable bit for the pin as well.
--- drivers/gpio/gpio-lynxpoint.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpio/gpio-lynxpoint.c +3 -2
@@ -248,14 +248,15 @@ static void lp_gpio_irq_handler(unsignedstruct lp_gpio *lg =irq_data_get_irq_handler_data (data);struct irq_chip *chip =irq_data_get_irq_chip (data);u32 base, pin, mask; -unsigned long reg, pending; +unsigned long reg, ena, pending;unsigned virq;/* check from GPIO controller which pin triggered the interrupt */ for (base =0 ; base < lg->chip.ngpio; base +=32 ) { reg =lp_gpio_reg (&lg->chip, base,LP_INT_STAT ); + ena =lp_gpio_reg (&lg->chip, base,LP_INT_ENABLE ); -while ((pending =inl (reg))) { +while ((pending = (inl (reg) &inl (ena)))) { pin =__ffs (pending); mask =BIT (pin);/* Clear before handling so we don't lose an edge */
Greg Kroah-Hartman
maintainerPATCH 44/54 dm snapshot: fix data corruption
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikulas Patocka <[email protected]>
commit e9c6a182649f4259db704ae15a91ac820e63b0ca upstream.
This patch fixes a particular type of data corruption that has been encountered when loading a snapshot's metadata from disk.
When we allocate a new chunk in persistent_prepare, we increment ps->next_free and we make sure that it doesn't point to a metadata area by further incrementing it if necessary.
When we load metadata from disk on device activation, ps->next_free is positioned after the last used data chunk. However, if this last used data chunk is followed by a metadata area, ps->next_free is positioned erroneously to the metadata area. A newly-allocated chunk is placed at the same location as the metadata area, resulting in data or metadata corruption.
This patch changes the code so that ps->next_free skips the metadata area when metadata are loaded in function read_exceptions.
The patch also moves a piece of code from persistent_prepare_exception to a separate function skip_metadata to avoid code duplication.
CVE-2013-4299
--- drivers/md/dm-snap-persistent.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
drivers/md/dm-snap-persistent.c +12 -6
@@ -269,6 +269,14 @@ static chunk_t area_location(struct pstoreturn NUM_SNAPSHOT_HDR_CHUNKS + ((ps->exceptions_per_area +1 ) * area); } +static void skip_metadata (struct pstore *ps) +{ +uint32_t stride = ps->exceptions_per_area +1 ; +chunk_t next_free = ps->next_free; +if (sector_div (next_free, stride) ==NUM_SNAPSHOT_HDR_CHUNKS ) + ps->next_free++; +} +/* * Read or write a metadata area. Remembering to skip the first * chunk which holds the header.
@@ -502,6 +510,8 @@ static int read_exceptions(struct pstore ps->current_area--; +skip_metadata (ps); +return 0 ; }
@@ -616,8 +626,6 @@ static int persistent_prepare_exception( struct dm_exception *e) {struct pstore *ps =get_info (store); -uint32_t stride; -chunk_t next_free;sector_t size =get_dev_size (dm_snap_cow (store->snap)->bdev);/* Is there enough room ? */
@@ -630,10 +638,8 @@ static int persistent_prepare_exception(* Move onto the next free pending, making sure to take * into account the location of the metadata chunks. */ - stride = (ps->exceptions_per_area +1 ); - next_free = ++ps->next_free; -if (sector_div (next_free, stride) ==1 ) - ps->next_free++; + ps->next_free++; +skip_metadata (ps);atomic_inc (&ps->pending_count);return 0 ;
Greg Kroah-Hartman
maintainerPATCH 45/54 i2c: ismt: initialize DMA buffer
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: James Ralston <[email protected]>
commit bf4169100c909667ede6af67668b3ecce6928343 upstream.
This patch adds code to initialize the DMA buffer to compensate for possible hardware data corruption.
--- drivers/i2c/busses/i2c-ismt.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/i2c/busses/i2c-ismt.c +3 -0
@@ -393,6 +393,9 @@ static int ismt_access(struct i2c_adapte desc = &priv->hw[priv->head]; +/* Initialize the DMA buffer */ +memset (priv->dma_buffer,0 ,sizeof (priv->dma_buffer)); +/* Initialize the descriptor */ memset (desc,0 ,sizeof (struct ismt_desc )); desc->tgtaddr_rw =ISMT_DESC_ADDR_RW (addr, read_write);
Greg Kroah-Hartman
maintainerPATCH 46/54 mm: fix BUG in __split_huge_page_pmd
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hugh Dickins <[email protected]>
commit 750e8165f5e87b6a142be953640eabb13a9d350a upstream.
Occasionally we hit the BUG_ON(pmd_trans_huge(*pmd)) at the end of __split_huge_page_pmd(): seen when doing madvise(,,MADV_DONTNEED).
It's invalid: we don't always have down_write of mmap_sem there: a racing do_huge_pmd_wp_page() might have copied-on-write to another huge page before our split_huge_page() got the anon_vma lock.
Forget the BUG_ON, just go back and try again if this happens.
--- mm/huge_memory.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
mm/huge_memory.c +9 -1
@@ -2699,6 +2699,7 @@ void __split_huge_page_pmd(struct vm_are mmun_start = haddr; mmun_end = haddr +HPAGE_PMD_SIZE ; +again:mmu_notifier_invalidate_range_start (mm, mmun_start, mmun_end);spin_lock (&mm->page_table_lock);if (unlikely (!pmd_trans_huge (*pmd))) {
@@ -2721,7 +2722,14 @@ void __split_huge_page_pmd(struct vm_aresplit_huge_page (page);put_page (page); -BUG_ON (pmd_trans_huge (*pmd)); + +/* +* We don't always have down_write of mmap_sem here: a racing +* do_huge_pmd_wp_page() might have copied-on-write to another +* huge page before our split_huge_page() got the anon_vma lock. +*/ +if (unlikely (pmd_trans_huge (*pmd))) + goto again; } void split_huge_page_pmd_mm(struct mm_struct *mm, unsigned long address,
Greg Kroah-Hartman
maintainerPATCH 47/54 ALSA: us122l: Fix pcm_usb_stream mmapping regression
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
commit ac536a848a1643e4b87e8fbd376a63091afc2ccc upstream.
The pcm_usb_stream plugin requires the mremap explicitly for the read buffer, as it expands itself once after reading the required size. But the commit [314e51b9: mm: kill vma flag VM_RESERVED and mm->reserved_vm counter] converted blindly to a combination of VM_DONTEXPAND | VM_DONTDUMP like other normal drivers, and this resulted in the failure of mremap().
For fixing this regression, we need to remove VM_DONTEXPAND for the read-buffer mmap.
--- sound/usb/usx2y/us122l.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
sound/usb/usx2y/us122l.c +3 -1
@@ -262,7 +262,9 @@ static int usb_stream_hwdep_mmap(struct } area->vm_ops = &usb_stream_hwdep_vm_ops; - area->vm_flags |=VM_DONTEXPAND |VM_DONTDUMP ; + area->vm_flags |=VM_DONTDUMP ; +if (!read) + area->vm_flags |=VM_DONTEXPAND ; area->vm_private_data = us122l;atomic_inc (&us122l->mmap_count); out:
Greg Kroah-Hartman
maintainerPATCH 48/54 ALSA: hda - Fix inverted internal mic not indicated on some machines
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Henningsson <[email protected]>
commit ccb041571b73888785ef7828a276e380125891a4 upstream.
The create_bind_cap_vol_ctl does not create any control indicating that an inverted dmic is present. Therefore, create multiple capture volumes in this scenario, so we always have some indication that the internal mic is inverted.
This happens on the Lenovo Ideapad U310 as well as the Lenovo Yoga 13 (both are based on the CX20590 codec), but the fix is generic and could be needed for other codecs/machines too.
Thanks to Szymon Acedański for the pointer and a draft patch.
--- sound/pci/hda/hda_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/hda/hda_generic.c +1 -1
@@ -3474,7 +3474,7 @@ static int create_capture_mixers(structif (!multi) err =create_single_cap_vol_ctl (codec, n, vol, sw, inv_dmic); -else if (!multi_cap_vol) +else if (!multi_cap_vol && !inv_dmic) err =create_bind_cap_vol_ctl (codec, n, vol, sw);else err =create_multi_cap_vol_ctl (codec);
Greg Kroah-Hartman
maintainerPATCH 49/54 writeback: fix negative bdi max pause
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fengguang Wu <[email protected]>
commit e3b6c655b91e01a1dade056cfa358581b47a5351 upstream.
Toralf runs trinity on UML/i386. After some time it hangs and the last message line is
BUG: soft lockup - CPU#0 stuck for 22s! [trinity-child0:1521]
It's found that pages_dirtied becomes very large. More than 1000000000 pages in this case:
period = HZ * pages_dirtied / task_ratelimit; BUG_ON(pages_dirtied > 2000000000); BUG_ON(pages_dirtied > 1000000000); <---------
UML debug printf shows that we got negative pause here:
ick: pause : -984
ick: pages_dirtied : 0
ick: task_ratelimit: 0
pause:
+ if (pause < 0) {
+ extern int printf(char *, ...);
+ printf("ick : pause : %li\n", pause);
+ printf("ick: pages_dirtied : %lu\n", pages_dirtied);
+ printf("ick: task_ratelimit: %lu\n", task_ratelimit);
+ BUG_ON(1);
+ }
trace_balance_dirty_pages(bdi,
Since pause is bounded by [min_pause, max_pause] where min_pause is also bounded by max_pause. It's suspected and demonstrated that the max_pause calculation goes wrong:
ick: pause : -717 ick: min_pause : -177 ick: max_pause : -717 ick: pages_dirtied : 14 ick: task_ratelimit: 0
The problem lies in the two "long = unsigned long" assignments in bdi_max_pause() which might go negative if the highest bit is 1, and the min_t(long, ...) check failed to protect it falling under 0. Fix all of them by using "unsigned long" throughout the function.
--- mm/page-writeback.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
mm/page-writeback.c +5 -5
@@ -1104,11 +1104,11 @@ static unsigned long dirty_poll_intervalreturn 1 ; } -static long bdi_max_pause (struct backing_dev_info *bdi, -unsigned long bdi_dirty) +static unsigned long bdi_max_pause (struct backing_dev_info *bdi, +unsigned long bdi_dirty) { -long bw = bdi->avg_write_bandwidth; -long t; +unsigned long bw = bdi->avg_write_bandwidth; +unsigned long t;/* * Limit pause time for small memory systems. If sleeping for too long
@@ -1120,7 +1120,7 @@ static long bdi_max_pause(struct backing t = bdi_dirty / (1 + bw /roundup_pow_of_two (1 +HZ /8 )); t++; -return min_t (long, t,MAX_PAUSE ); + return min_t(unsigned long, t, MAX_PAUSE); } static long bdi_min_pause(struct backing_dev_info *bdi,
Greg Kroah-Hartman
maintainerPATCH 50/54 wireless: radiotap: fix parsing buffer overrun
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Berg <[email protected]>
commit f5563318ff1bde15b10e736e97ffce13be08bc1a upstream.
When parsing an invalid radiotap header, the parser can overrun the buffer that is passed in because it doesn't correctly check
1) the minimum radiotap header size
2) the space for extended bitmaps
The first issue doesn't affect any in-kernel user as they all check the minimum size before calling the radiotap function. The second issue could potentially affect the kernel if an skb is passed in that consists only of the radiotap header with a lot of extended bitmaps that extend past the SKB. In that case a read-only buffer overrun by at most 4 bytes is possible.
Fix this by adding the appropriate checks to the parser.
--- net/wireless/radiotap.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
net/wireless/radiotap.c +6 -1
@@ -97,6 +97,10 @@ int ieee80211_radiotap_iterator_init(struct ieee80211_radiotap_header *radiotap_header, int max_length, const struct ieee80211_radiotap_vendor_namespaces *vns) { + /* check the radiotap header can actually be present */ + if (max_length < sizeof(struct ieee80211_radiotap_header)) + return -EINVAL; +/* Linux only supports version 0 radiotap format */ if (radiotap_header->it_version)return -EINVAL ;
@@ -131,7 +135,8 @@ int ieee80211_radiotap_iterator_init(*/ if ((unsigned long )iterator->_arg - - (unsigned long )iterator->_rtheader > + (unsigned long )iterator->_rtheader + +sizeof (uint32_t ) > (unsigned long )iterator->_max_length)return -EINVAL ; }
Greg Kroah-Hartman
maintainerPATCH 51/54 serial: vt8500: add missing braces
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Roel Kluin <[email protected]>
commit d969de8d83401683420638c8107dcfedb2146f37 upstream.
Due to missing braces on an if statement, in presence of a device_node a port was always assigned -1, regardless of any alias entries in the device tree. Conversely, if device_node was NULL, an unitialized port ended up being used.
This patch adds the missing braces, fixing the issues.
--- drivers/tty/serial/vt8500_serial.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/tty/serial/vt8500_serial.c +3 -2
@@ -559,12 +559,13 @@ static int vt8500_serial_probe(struct plif (!mmres || !irqres)return -ENODEV ; -if (np) +if (np) { port =of_alias_get_id (np,"serial" );if (port >=VT8500_MAX_PORTS ) port =-1 ; -else + }else { port =-1 ; + }if (port <0 ) {/* calculate the port id */
Greg Kroah-Hartman
maintainerPATCH 52/54 USB: serial: ti_usb_3410_5052: add Abbott strip port ID to combined table as well.
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Diego Elio Pettenò <[email protected]>
commit c9d09dc7ad106492c17c587b6eeb99fe3f43e522 upstream.
Without this change, the USB cable for Freestyle Option and compatible glucometers will not be detected by the driver.
--- drivers/usb/serial/ti_usb_3410_5052.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/serial/ti_usb_3410_5052.c +1 -0
@@ -203,6 +203,7 @@ static struct usb_device_id ti_id_table_ { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_PRODUCT_ID) }, + { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_STRIP_PORT_ID) }, { USB_DEVICE(TI_VENDOR_ID, FRI2_PRODUCT_ID) }, { } };
Greg Kroah-Hartman
maintainerPATCH 53/54 USB: serial: option: add support for Inovia SEW858 device
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Greg Kroah-Hartman <[email protected]>
commit f4c19b8e165cff1a6607c21f8809441d61cab7ec upstream.
This patch adds the device id for the Inovia SEW858 device to the option driver.
--- drivers/usb/serial/option.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/usb/serial/option.c +5 -0
@@ -451,6 +451,10 @@ static void option_instat_callback(struc#define CHANGHONG_VENDOR_ID 0x2077#define CHANGHONG_PRODUCT_CH690 0x7001 +/* Inovia */ +#define INOVIA_VENDOR_ID 0x20a6 +#define INOVIA_SEW858 0x1105 +/* some devices interfaces need special handling due to a number of reasons */ enum option_blacklist_reason {OPTION_BLACKLIST_NONE =0 ,
@@ -1345,6 +1349,7 @@ static const struct usb_device_id option { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) }, { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */ { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */ + { USB_DEVICE(INOVIA_VENDOR_ID, INOVIA_SEW858) }, { } /* Terminating entry */ };MODULE_DEVICE_TABLE (usb, option_ids);
Greg Kroah-Hartman
maintainerPATCH 54/54 usb: serial: option: blacklist Olivetti Olicard200
In reply to Greg Kroah-Hartman3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Enrico Mioso <[email protected]>
commit fd8573f5828873343903215f203f14dc82de397c upstream.
Interface 6 of this device speaks QMI as per tests done by us. Credits go to Antonella for providing the hardware.
--- drivers/usb/serial/option.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/usb/serial/option.c +3 -1
@@ -1261,7 +1261,9 @@ static const struct usb_device_id option { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) }, { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD145) }, - { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD200) }, + { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD200), + .driver_info = (kernel_ulong_t)&net_intf6_blacklist + }, { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */ { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730 LTE USB modem.*/ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM600) },
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.10.18 release. There are 54 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 Sun Nov 3 22:00:53 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.10.18-rc1.gzand the diffstat can be found below.
Build results look good:
total: 110 pass: 110 skipped: 0 fail: 0
qemu tests all pass.
Details are at http://server.roeck-us.net:8010/builders.
Thanks,
Guenter
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.10.18 release. There are 54 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 Nov 3 22:00:53 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.10.18-rc1.gzand the diffstat can be found below.
thanks,
greg k-h
Release 3.10.18
Patch applied cleanly yes
Compile test passed
Boot test passed
dmesg regression test passed
Cross-compile test 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.
Architecture Config 3.10.18
alpha defconfig Passed
arm defconfig Passed
arm64 defconfig Passed
blackfin defconfig Passed
c6x defconfig Passed
mips defconfig Passed
mipsel defconfig Passed
powerpc wii_defconfig Passed
sh defconfig Passed
sparc defconfig Passed
tile defconfig Passed
-- Shuah
Signature · 4 lines
Shuah Khan Senior Linux Kernel Developer - Open Source Group Samsung Research America(Silicon Valley) [email protected] | (970) 672-0658