Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
There were quite a few overlapping sets of changes here. Daniel's bug fix for off-by-ones in the new BPF branch instructions, along with the added allowances for "data_end > ptr + x" forms collided with the metadata additions. Along with those three changes came veritifer test cases, which in their final form I tried to group together properly. If I had just trimmed GIT's conflict tags as-is, this would have split up the meta tests unnecessarily. In the socketmap code, a set of preemption disabling changes overlapped with the rename of bpf_compute_data_end() to bpf_compute_data_pointers(). Changes were made to the mv88e6060.c driver set addr method which got removed in net-next. The hyperv transport socket layer had a locking change in 'net' which overlapped with a change of socket state macro usage in 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -78,7 +78,7 @@ MODULE_PARM_DESC(stats_timer, "enable timer for statistics (default:on)");
|
||||
static struct kmem_cache *rcv_cache __read_mostly;
|
||||
|
||||
/* table of registered CAN protocols */
|
||||
static const struct can_proto *proto_tab[CAN_NPROTO] __read_mostly;
|
||||
static const struct can_proto __rcu *proto_tab[CAN_NPROTO] __read_mostly;
|
||||
static DEFINE_MUTEX(proto_tab_lock);
|
||||
|
||||
static atomic_t skbcounter = ATOMIC_INIT(0);
|
||||
@@ -788,7 +788,7 @@ int can_proto_register(const struct can_proto *cp)
|
||||
|
||||
mutex_lock(&proto_tab_lock);
|
||||
|
||||
if (proto_tab[proto]) {
|
||||
if (rcu_access_pointer(proto_tab[proto])) {
|
||||
pr_err("can: protocol %d already registered\n", proto);
|
||||
err = -EBUSY;
|
||||
} else
|
||||
@@ -812,7 +812,7 @@ void can_proto_unregister(const struct can_proto *cp)
|
||||
int proto = cp->protocol;
|
||||
|
||||
mutex_lock(&proto_tab_lock);
|
||||
BUG_ON(proto_tab[proto] != cp);
|
||||
BUG_ON(rcu_access_pointer(proto_tab[proto]) != cp);
|
||||
RCU_INIT_POINTER(proto_tab[proto], NULL);
|
||||
mutex_unlock(&proto_tab_lock);
|
||||
|
||||
@@ -875,9 +875,14 @@ static int can_pernet_init(struct net *net)
|
||||
spin_lock_init(&net->can.can_rcvlists_lock);
|
||||
net->can.can_rx_alldev_list =
|
||||
kzalloc(sizeof(struct dev_rcv_lists), GFP_KERNEL);
|
||||
|
||||
if (!net->can.can_rx_alldev_list)
|
||||
goto out;
|
||||
net->can.can_stats = kzalloc(sizeof(struct s_stats), GFP_KERNEL);
|
||||
if (!net->can.can_stats)
|
||||
goto out_free_alldev_list;
|
||||
net->can.can_pstats = kzalloc(sizeof(struct s_pstats), GFP_KERNEL);
|
||||
if (!net->can.can_pstats)
|
||||
goto out_free_can_stats;
|
||||
|
||||
if (IS_ENABLED(CONFIG_PROC_FS)) {
|
||||
/* the statistics are updated every second (timer triggered) */
|
||||
@@ -892,6 +897,13 @@ static int can_pernet_init(struct net *net)
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
out_free_can_stats:
|
||||
kfree(net->can.can_stats);
|
||||
out_free_alldev_list:
|
||||
kfree(net->can.can_rx_alldev_list);
|
||||
out:
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
static void can_pernet_exit(struct net *net)
|
||||
|
Reference in New Issue
Block a user