From: David S. Miller Date: Fri, 4 Dec 2015 02:03:21 +0000 (-0500) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net X-Git-Tag: v4.5-rc1~128^2~209 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f188b951f33a0464338f94f928338f84fc0e4392;p=thirdparty%2Flinux.git Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Conflicts: drivers/net/ethernet/renesas/ravb_main.c kernel/bpf/syscall.c net/ipv4/ipmr.c All three conflicts were cases of overlapping changes. Signed-off-by: David S. Miller --- f188b951f33a0464338f94f928338f84fc0e4392 diff --cc drivers/net/ethernet/renesas/ravb_main.c index 2c613d3678735,ed5da4d476684..be019e769c833 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@@ -1245,11 -1242,12 +1245,13 @@@ static int ravb_open(struct net_device out_ptp_stop: /* Stop PTP Clock driver */ - ravb_ptp_stop(ndev); + if (priv->chip_id == RCAR_GEN2) + ravb_ptp_stop(ndev); + out_free_irq2: + if (priv->chip_id == RCAR_GEN3) + free_irq(priv->emac_irq, ndev); out_free_irq: free_irq(ndev->irq, ndev); - free_irq(priv->emac_irq, ndev); out_napi_off: napi_disable(&priv->napi[RAVB_NC]); napi_disable(&priv->napi[RAVB_BE]); diff --cc kernel/bpf/syscall.c index 6d1407bc15310,3b39550d84856..637397059f763 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@@ -93,42 -101,20 +101,40 @@@ void bpf_map_put(struct bpf_map *map } } + void bpf_map_put_with_uref(struct bpf_map *map) + { + bpf_map_put_uref(map); + bpf_map_put(map); + } + + static int bpf_map_release(struct inode *inode, struct file *filp) + { + bpf_map_put_with_uref(filp->private_data); + return 0; + } + +#ifdef CONFIG_PROC_FS +static void bpf_map_show_fdinfo(struct seq_file *m, struct file *filp) +{ + const struct bpf_map *map = filp->private_data; + + seq_printf(m, + "map_type:\t%u\n" + "key_size:\t%u\n" + "value_size:\t%u\n" + "max_entries:\t%u\n", + map->map_type, + map->key_size, + map->value_size, + map->max_entries); +} +#endif + - static int bpf_map_release(struct inode *inode, struct file *filp) - { - struct bpf_map *map = filp->private_data; - - if (map->map_type == BPF_MAP_TYPE_PROG_ARRAY) - /* prog_array stores refcnt-ed bpf_prog pointers - * release them all when user space closes prog_array_fd - */ - bpf_fd_array_map_clear(map); - - bpf_map_put(map); - return 0; - } - static const struct file_operations bpf_map_fops = { - .release = bpf_map_release, +#ifdef CONFIG_PROC_FS + .show_fdinfo = bpf_map_show_fdinfo, +#endif + .release = bpf_map_release, }; int bpf_map_new_fd(struct bpf_map *map) diff --cc net/ipv4/ipmr.c index 4c10ee771648d,c3a38353f5dc8..395e2814a46d9 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c @@@ -1188,24 -1196,30 +1180,25 @@@ static int ipmr_mfc_add(struct net *net return 0; } -/* - * Close the multicast socket, and clear the vif tables etc - */ - +/* Close the multicast socket, and clear the vif tables etc */ - static void mroute_clean_tables(struct mr_table *mrt) + static void mroute_clean_tables(struct mr_table *mrt, bool all) { int i; LIST_HEAD(list); struct mfc_cache *c, *next; /* Shut down all active vif entries */ - for (i = 0; i < mrt->maxvif; i++) { - if (!(mrt->vif_table[i].flags & VIFF_STATIC)) - vif_delete(mrt, i, 0, &list); + if (!all && (mrt->vif_table[i].flags & VIFF_STATIC)) + continue; + vif_delete(mrt, i, 0, &list); } unregister_netdevice_many(&list); /* Wipe the cache */ - for (i = 0; i < MFC_LINES; i++) { list_for_each_entry_safe(c, next, &mrt->mfc_cache_array[i], list) { - if (c->mfc_flags & MFC_STATIC) + if (!all && (c->mfc_flags & MFC_STATIC)) continue; list_del_rcu(&c->list); mroute_netlink_event(mrt, c, RTM_DELROUTE);