Skip to content

Commit db10acc

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: "Sorry I let so much accumulate, I was in Buffalo and wanted a few things to cook in my tree for a while before sending to you. Anyways, it's a lot of little things as usual at this stage in the game" 1) Make bonding MAINTAINERS entry reflect reality, from Andy Gospodarek. 2) Fix accidental sock_put() on timewait mini sockets, from Eric Dumazet. 3) Fix crashes in l2tp due to mis-handling of ipv4 mapped ipv6 addresses, from François CACHEREUL. 4) Fix heap overflow in __audit_sockaddr(), from the eagle eyed Dan Carpenter. 5) tcp_shifted_skb() doesn't take handle FINs properly, from Eric Dumazet. 6) SFC driver bug fixes from Ben Hutchings. 7) Fix TX packet scheduling wedge after channel change in ath9k driver, from Felix Fietkau. 8) Fix user after free in BPF JIT code, from Alexei Starovoitov. 9) Source address selection test is reversed in __ip_route_output_key(), fix from Jiri Benc. 10) VLAN and CAN layer mis-size netlink attributes, from Marc Kleine-Budde. 11) Fix permission checks in sysctls to use current_euid() instead of current_uid(). From Eric W Biederman. 12) IPSEC policies can go away while a timer is still pending for them, add appropriate ref-counting to fix, from Steffen Klassert. 13) Fix mis-programming of FDR and RMCR registers on R8A7740 sh_eth chips, from Nguyen Hong Ky and Simon Horman. 14) MLX4 forgets to DMA unmap pages on RX, fix from Amir Vadai. 15) IPV6 GRE tunnel MTU upper limit is miscalculated, from Oussama Ghorbel. 16) Fix typo in fq_change(), we were assigning "initial quantum" to "quantum". From Eric Dumazet. 17) Set a more appropriate sk_pacing_rate for non-TCP sockets, otherwise FQ packet scheduler does not pace those flows properly. Also from Eric Dumazet. 18) rtlwifi miscalculates packet pointers, from Mark Cave-Ayland. 19) l2tp_xmit_skb() can be called from process context, not just softirq context, so we must always make sure to BH disable around it. From Eric Dumazet. 20) On qdisc reset, we forget to purge the RB tree of SKBs in netem packet scheduler. From Stephen Hemminger. 21) Fix info leak in farsync WAN driver ioctl() handler, from Dan Carpenter and Salva Peiró. 22) Fix PHY reset and other issues in dm9000 driver, from Nikita Kiryanov and Michael Abbott. 23) When hardware can do SCTP crc32 checksums, we accidently don't disable the csum offload when IPSEC transformations have been applied. From Fan Du and Vlad Yasevich. 24) Tail loss probing in TCP leaves the socket in the wrong congestion avoidance state. From Yuchung Cheng. 25) In CPSW driver, enable NAPI before interrupts are turned on, from Markus Pargmann. 26) Integer underflow and dual-assignment in YAM hamradio driver, from Dan Carpenter. 27) If we are going to mangle a packet in tcp_set_skb_tso_segs() we must unclone it. This fixes various hard to track down crashes in drivers where the SKBs ->gso_segs was changing right from underneath the driver during TX queueing. From Eric Dumazet. 28) Fix the handling of VLAN IDs, and in particular the special IDs 0 and 4095, in the bridging layer. From Toshiaki Makita. 29) Another info leak, this time in wanxl WAN driver, from Salva Peiró. 30) Fix race in socket credential passing, from Daniel Borkmann. 31) WHen NETLABEL is disabled, we don't validate CIPSO packets properly, from Seif Mazareeb. 32) Fix identification of fragmented frames in ipv4/ipv6 UDP Fragmentation Offload output paths, from Jiri Pirko. 33) Virtual Function fixes in bnx2x driver from Yuval Mintz and Ariel Elior. 34) When we removed the explicit neighbour pointer from ipv6 routes a slight regression was introduced for users such as IPVS, xt_TEE, and raw sockets. We mix up the users requested destination address with the routes assigned nexthop/gateway. From Julian Anastasov and Simon Horman. 35) Fix stack overruns in rt6_probe(), the issue is that can end up doing two full packet xmit paths at the same time when emitting neighbour discovery messages. From Hannes Frederic Sowa. 36) davinci_emac driver doesn't handle IFF_ALLMULTI correctly, from Mariusz Ceier. 37) Make sure to set TCP sk_pacing_rate after the first legitimate RTT sample, from Neal Cardwell. 38) Wrong netlink attribute passed to xfrm_replay_verify_len(), from Steffen Klassert. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (152 commits) ax88179_178a: Add VID:DID for Samsung USB Ethernet Adapter ax88179_178a: Correct the RX error definition in RX header Revert "bridge: only expire the mdb entry when query is received" tcp: initialize passive-side sk_pacing_rate after 3WHS davinci_emac.c: Fix IFF_ALLMULTI setup mac802154: correct a typo in ieee802154_alloc_device() prototype ipv6: probe routes asynchronous in rt6_probe netfilter: nf_conntrack: fix rt6i_gateway checks for H.323 helper ipv6: fill rt6i_gateway with nexthop address ipv6: always prefer rt6i_gateway if present bnx2x: Set NETIF_F_HIGHDMA unconditionally bnx2x: Don't pretend during register dump bnx2x: Lock DMAE when used by statistic flow bnx2x: Prevent null pointer dereference on error flow bnx2x: Fix config when SR-IOV and iSCSI are enabled bnx2x: Fix Coalescing configuration bnx2x: Unlock VF-PF channel on MAC/VLAN config error bnx2x: Prevent an illegal pointer dereference during panic bnx2x: Fix Maximum CoS estimation for VFs drivers: net: cpsw: fix kernel warn during iperf test with interrupt pacing ...
2 parents 294d31e + f11a5bc commit db10acc

137 files changed

Lines changed: 1311 additions & 715 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/connector/ucon.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ static int netlink_send(int s, struct cn_msg *msg)
7171
nlh->nlmsg_seq = seq++;
7272
nlh->nlmsg_pid = getpid();
7373
nlh->nlmsg_type = NLMSG_DONE;
74-
nlh->nlmsg_len = NLMSG_LENGTH(size - sizeof(*nlh));
74+
nlh->nlmsg_len = size;
7575
nlh->nlmsg_flags = 0;
7676

7777
m = NLMSG_DATA(nlh);

‎MAINTAINERS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,6 +1791,7 @@ F: include/net/bluetooth/
17911791

17921792
BONDING DRIVER
17931793
M: Jay Vosburgh <fubar@us.ibm.com>
1794+
M: Veaceslav Falico <vfalico@redhat.com>
17941795
M: Andy Gospodarek <andy@greyhouse.net>
17951796
L: netdev@vger.kernel.org
17961797
W: http://sourceforge.net/projects/bonding/

‎arch/arm/net/bpf_jit_32.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -930,4 +930,5 @@ void bpf_jit_free(struct sk_filter *fp)
930930
{
931931
if (fp->bpf_func != sk_run_filter)
932932
module_free(NULL, fp->bpf_func);
933+
kfree(fp);
933934
}

‎arch/powerpc/net/bpf_jit_comp.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,4 +691,5 @@ void bpf_jit_free(struct sk_filter *fp)
691691
{
692692
if (fp->bpf_func != sk_run_filter)
693693
module_free(NULL, fp->bpf_func);
694+
kfree(fp);
694695
}

‎arch/s390/net/bpf_jit_comp.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,9 @@ void bpf_jit_free(struct sk_filter *fp)
881881
struct bpf_binary_header *header = (void *)addr;
882882

883883
if (fp->bpf_func == sk_run_filter)
884-
return;
884+
goto free_filter;
885885
set_memory_rw(addr, header->pages);
886886
module_free(NULL, header);
887+
free_filter:
888+
kfree(fp);
887889
}

‎arch/sparc/net/bpf_jit_comp.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,4 +808,5 @@ void bpf_jit_free(struct sk_filter *fp)
808808
{
809809
if (fp->bpf_func != sk_run_filter)
810810
module_free(NULL, fp->bpf_func);
811+
kfree(fp);
811812
}

‎arch/x86/net/bpf_jit_comp.c‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -772,13 +772,21 @@ cond_branch: f_offset = addrs[i + filter[i].jf] - addrs[i];
772772
return;
773773
}
774774

775+
static void bpf_jit_free_deferred(struct work_struct *work)
776+
{
777+
struct sk_filter *fp = container_of(work, struct sk_filter, work);
778+
unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK;
779+
struct bpf_binary_header *header = (void *)addr;
780+
781+
set_memory_rw(addr, header->pages);
782+
module_free(NULL, header);
783+
kfree(fp);
784+
}
785+
775786
void bpf_jit_free(struct sk_filter *fp)
776787
{
777788
if (fp->bpf_func != sk_run_filter) {
778-
unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK;
779-
struct bpf_binary_header *header = (void *)addr;
780-
781-
set_memory_rw(addr, header->pages);
782-
module_free(NULL, header);
789+
INIT_WORK(&fp->work, bpf_jit_free_deferred);
790+
schedule_work(&fp->work);
783791
}
784792
}

‎drivers/connector/cn_proc.c‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ void proc_fork_connector(struct task_struct *task)
6565

6666
msg = (struct cn_msg *)buffer;
6767
ev = (struct proc_event *)msg->data;
68+
memset(&ev->event_data, 0, sizeof(ev->event_data));
6869
get_seq(&msg->seq, &ev->cpu);
6970
ktime_get_ts(&ts); /* get high res monotonic timestamp */
7071
put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns);
@@ -80,6 +81,7 @@ void proc_fork_connector(struct task_struct *task)
8081
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
8182
msg->ack = 0; /* not used */
8283
msg->len = sizeof(*ev);
84+
msg->flags = 0; /* not used */
8385
/* If cn_netlink_send() failed, the data is not sent */
8486
cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL);
8587
}
@@ -96,6 +98,7 @@ void proc_exec_connector(struct task_struct *task)
9698

9799
msg = (struct cn_msg *)buffer;
98100
ev = (struct proc_event *)msg->data;
101+
memset(&ev->event_data, 0, sizeof(ev->event_data));
99102
get_seq(&msg->seq, &ev->cpu);
100103
ktime_get_ts(&ts); /* get high res monotonic timestamp */
101104
put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns);
@@ -106,6 +109,7 @@ void proc_exec_connector(struct task_struct *task)
106109
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
107110
msg->ack = 0; /* not used */
108111
msg->len = sizeof(*ev);
112+
msg->flags = 0; /* not used */
109113
cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL);
110114
}
111115

@@ -122,6 +126,7 @@ void proc_id_connector(struct task_struct *task, int which_id)
122126

123127
msg = (struct cn_msg *)buffer;
124128
ev = (struct proc_event *)msg->data;
129+
memset(&ev->event_data, 0, sizeof(ev->event_data));
125130
ev->what = which_id;
126131
ev->event_data.id.process_pid = task->pid;
127132
ev->event_data.id.process_tgid = task->tgid;
@@ -145,6 +150,7 @@ void proc_id_connector(struct task_struct *task, int which_id)
145150
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
146151
msg->ack = 0; /* not used */
147152
msg->len = sizeof(*ev);
153+
msg->flags = 0; /* not used */
148154
cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL);
149155
}
150156

@@ -160,6 +166,7 @@ void proc_sid_connector(struct task_struct *task)
160166

161167
msg = (struct cn_msg *)buffer;
162168
ev = (struct proc_event *)msg->data;
169+
memset(&ev->event_data, 0, sizeof(ev->event_data));
163170
get_seq(&msg->seq, &ev->cpu);
164171
ktime_get_ts(&ts); /* get high res monotonic timestamp */
165172
put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns);
@@ -170,6 +177,7 @@ void proc_sid_connector(struct task_struct *task)
170177
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
171178
msg->ack = 0; /* not used */
172179
msg->len = sizeof(*ev);
180+
msg->flags = 0; /* not used */
173181
cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL);
174182
}
175183

@@ -185,6 +193,7 @@ void proc_ptrace_connector(struct task_struct *task, int ptrace_id)
185193

186194
msg = (struct cn_msg *)buffer;
187195
ev = (struct proc_event *)msg->data;
196+
memset(&ev->event_data, 0, sizeof(ev->event_data));
188197
get_seq(&msg->seq, &ev->cpu);
189198
ktime_get_ts(&ts); /* get high res monotonic timestamp */
190199
put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns);
@@ -203,6 +212,7 @@ void proc_ptrace_connector(struct task_struct *task, int ptrace_id)
203212
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
204213
msg->ack = 0; /* not used */
205214
msg->len = sizeof(*ev);
215+
msg->flags = 0; /* not used */
206216
cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL);
207217
}
208218

@@ -218,6 +228,7 @@ void proc_comm_connector(struct task_struct *task)
218228

219229
msg = (struct cn_msg *)buffer;
220230
ev = (struct proc_event *)msg->data;
231+
memset(&ev->event_data, 0, sizeof(ev->event_data));
221232
get_seq(&msg->seq, &ev->cpu);
222233
ktime_get_ts(&ts); /* get high res monotonic timestamp */
223234
put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns);
@@ -229,6 +240,7 @@ void proc_comm_connector(struct task_struct *task)
229240
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
230241
msg->ack = 0; /* not used */
231242
msg->len = sizeof(*ev);
243+
msg->flags = 0; /* not used */
232244
cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL);
233245
}
234246

@@ -244,6 +256,7 @@ void proc_coredump_connector(struct task_struct *task)
244256

245257
msg = (struct cn_msg *)buffer;
246258
ev = (struct proc_event *)msg->data;
259+
memset(&ev->event_data, 0, sizeof(ev->event_data));
247260
get_seq(&msg->seq, &ev->cpu);
248261
ktime_get_ts(&ts); /* get high res monotonic timestamp */
249262
put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns);
@@ -254,6 +267,7 @@ void proc_coredump_connector(struct task_struct *task)
254267
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
255268
msg->ack = 0; /* not used */
256269
msg->len = sizeof(*ev);
270+
msg->flags = 0; /* not used */
257271
cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL);
258272
}
259273

@@ -269,6 +283,7 @@ void proc_exit_connector(struct task_struct *task)
269283

270284
msg = (struct cn_msg *)buffer;
271285
ev = (struct proc_event *)msg->data;
286+
memset(&ev->event_data, 0, sizeof(ev->event_data));
272287
get_seq(&msg->seq, &ev->cpu);
273288
ktime_get_ts(&ts); /* get high res monotonic timestamp */
274289
put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns);
@@ -281,6 +296,7 @@ void proc_exit_connector(struct task_struct *task)
281296
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
282297
msg->ack = 0; /* not used */
283298
msg->len = sizeof(*ev);
299+
msg->flags = 0; /* not used */
284300
cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL);
285301
}
286302

@@ -304,6 +320,7 @@ static void cn_proc_ack(int err, int rcvd_seq, int rcvd_ack)
304320

305321
msg = (struct cn_msg *)buffer;
306322
ev = (struct proc_event *)msg->data;
323+
memset(&ev->event_data, 0, sizeof(ev->event_data));
307324
msg->seq = rcvd_seq;
308325
ktime_get_ts(&ts); /* get high res monotonic timestamp */
309326
put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns);
@@ -313,6 +330,7 @@ static void cn_proc_ack(int err, int rcvd_seq, int rcvd_ack)
313330
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
314331
msg->ack = rcvd_ack + 1;
315332
msg->len = sizeof(*ev);
333+
msg->flags = 0; /* not used */
316334
cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL);
317335
}
318336

‎drivers/connector/connector.c‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ int cn_netlink_send(struct cn_msg *msg, u32 __group, gfp_t gfp_mask)
109109

110110
data = nlmsg_data(nlh);
111111

112-
memcpy(data, msg, sizeof(*data) + msg->len);
112+
memcpy(data, msg, size);
113113

114114
NETLINK_CB(skb).dst_group = group;
115115

@@ -157,17 +157,18 @@ static int cn_call_callback(struct sk_buff *skb)
157157
static void cn_rx_skb(struct sk_buff *__skb)
158158
{
159159
struct nlmsghdr *nlh;
160-
int err;
161160
struct sk_buff *skb;
161+
int len, err;
162162

163163
skb = skb_get(__skb);
164164

165165
if (skb->len >= NLMSG_HDRLEN) {
166166
nlh = nlmsg_hdr(skb);
167+
len = nlmsg_len(nlh);
167168

168-
if (nlh->nlmsg_len < sizeof(struct cn_msg) ||
169+
if (len < (int)sizeof(struct cn_msg) ||
169170
skb->len < nlh->nlmsg_len ||
170-
nlh->nlmsg_len > CONNECTOR_MAX_MSG_SIZE) {
171+
len > CONNECTOR_MAX_MSG_SIZE) {
171172
kfree_skb(skb);
172173
return;
173174
}

‎drivers/net/can/at91_can.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,10 +1405,10 @@ static int at91_can_remove(struct platform_device *pdev)
14051405

14061406
static const struct platform_device_id at91_can_id_table[] = {
14071407
{
1408-
.name = "at91_can",
1408+
.name = "at91sam9x5_can",
14091409
.driver_data = (kernel_ulong_t)&at91_at91sam9x5_data,
14101410
}, {
1411-
.name = "at91sam9x5_can",
1411+
.name = "at91_can",
14121412
.driver_data = (kernel_ulong_t)&at91_at91sam9263_data,
14131413
}, {
14141414
/* sentinel */

0 commit comments

Comments
 (0)