aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-10-08 23:07:53 -0400
committerDavid S. Miller <davem@davemloft.net>2013-10-08 23:07:53 -0400
commit53af53ae83fe960ceb9ef74cac7915e9088f4266 (patch)
tree0cd5309f2a931d3f210aa3d2025aae64f2276e8c /net/core
parentb343ca84b4e3ba65508503333c923a797801a588 (diff)
parent9684d7b0dab3cf3a897edd85dca501d413888d56 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: include/linux/netdevice.h net/core/sock.c Trivial merge issues. Removal of "extern" for functions declaration in netdevice.h at the same time "const" was added to an argument. Two parallel line additions in net/core/sock.c Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c3
-rw-r--r--net/core/filter.c8
-rw-r--r--net/core/sock.c1
3 files changed, 7 insertions, 5 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index fa0b2b06c1a6..1b6eadf69289 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1916,7 +1916,8 @@ static struct xps_map *expand_xps_map(struct xps_map *map,
1916 return new_map; 1916 return new_map;
1917} 1917}
1918 1918
1919int netif_set_xps_queue(struct net_device *dev, struct cpumask *mask, u16 index) 1919int netif_set_xps_queue(struct net_device *dev, const struct cpumask *mask,
1920 u16 index)
1920{ 1921{
1921 struct xps_dev_maps *dev_maps, *new_dev_maps = NULL; 1922 struct xps_dev_maps *dev_maps, *new_dev_maps = NULL;
1922 struct xps_map *map, *new_map; 1923 struct xps_map *map, *new_map;
diff --git a/net/core/filter.c b/net/core/filter.c
index 6438f29ff266..01b780856db2 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -644,7 +644,6 @@ void sk_filter_release_rcu(struct rcu_head *rcu)
644 struct sk_filter *fp = container_of(rcu, struct sk_filter, rcu); 644 struct sk_filter *fp = container_of(rcu, struct sk_filter, rcu);
645 645
646 bpf_jit_free(fp); 646 bpf_jit_free(fp);
647 kfree(fp);
648} 647}
649EXPORT_SYMBOL(sk_filter_release_rcu); 648EXPORT_SYMBOL(sk_filter_release_rcu);
650 649
@@ -683,7 +682,7 @@ int sk_unattached_filter_create(struct sk_filter **pfp,
683 if (fprog->filter == NULL) 682 if (fprog->filter == NULL)
684 return -EINVAL; 683 return -EINVAL;
685 684
686 fp = kmalloc(fsize + sizeof(*fp), GFP_KERNEL); 685 fp = kmalloc(sk_filter_size(fprog->len), GFP_KERNEL);
687 if (!fp) 686 if (!fp)
688 return -ENOMEM; 687 return -ENOMEM;
689 memcpy(fp->insns, fprog->filter, fsize); 688 memcpy(fp->insns, fprog->filter, fsize);
@@ -723,6 +722,7 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk)
723{ 722{
724 struct sk_filter *fp, *old_fp; 723 struct sk_filter *fp, *old_fp;
725 unsigned int fsize = sizeof(struct sock_filter) * fprog->len; 724 unsigned int fsize = sizeof(struct sock_filter) * fprog->len;
725 unsigned int sk_fsize = sk_filter_size(fprog->len);
726 int err; 726 int err;
727 727
728 if (sock_flag(sk, SOCK_FILTER_LOCKED)) 728 if (sock_flag(sk, SOCK_FILTER_LOCKED))
@@ -732,11 +732,11 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk)
732 if (fprog->filter == NULL) 732 if (fprog->filter == NULL)
733 return -EINVAL; 733 return -EINVAL;
734 734
735 fp = sock_kmalloc(sk, fsize+sizeof(*fp), GFP_KERNEL); 735 fp = sock_kmalloc(sk, sk_fsize, GFP_KERNEL);
736 if (!fp) 736 if (!fp)
737 return -ENOMEM; 737 return -ENOMEM;
738 if (copy_from_user(fp->insns, fprog->filter, fsize)) { 738 if (copy_from_user(fp->insns, fprog->filter, fsize)) {
739 sock_kfree_s(sk, fp, fsize+sizeof(*fp)); 739 sock_kfree_s(sk, fp, sk_fsize);
740 return -EFAULT; 740 return -EFAULT;
741 } 741 }
742 742
diff --git a/net/core/sock.c b/net/core/sock.c
index 2bd9b3faa0d0..fd6afa267475 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2331,6 +2331,7 @@ void sock_init_data(struct socket *sock, struct sock *sk)
2331#endif 2331#endif
2332 2332
2333 sk->sk_max_pacing_rate = ~0U; 2333 sk->sk_max_pacing_rate = ~0U;
2334 sk->sk_pacing_rate = ~0U;
2334 /* 2335 /*
2335 * Before updating sk_refcnt, we must commit prior changes to memory 2336 * Before updating sk_refcnt, we must commit prior changes to memory
2336 * (Documentation/RCU/rculist_nulls.txt for details) 2337 * (Documentation/RCU/rculist_nulls.txt for details)