Merge tag 'v3.4-rc5' into next
Linux 3.4-rc5
Merge to pull in prerequisite change for Smack:
86812bb0de
Requested by Casey.
This commit is contained in:
@@ -1409,14 +1409,34 @@ EXPORT_SYMBOL(register_netdevice_notifier);
|
||||
* register_netdevice_notifier(). The notifier is unlinked into the
|
||||
* kernel structures and may then be reused. A negative errno code
|
||||
* is returned on a failure.
|
||||
*
|
||||
* After unregistering unregister and down device events are synthesized
|
||||
* for all devices on the device list to the removed notifier to remove
|
||||
* the need for special case cleanup code.
|
||||
*/
|
||||
|
||||
int unregister_netdevice_notifier(struct notifier_block *nb)
|
||||
{
|
||||
struct net_device *dev;
|
||||
struct net *net;
|
||||
int err;
|
||||
|
||||
rtnl_lock();
|
||||
err = raw_notifier_chain_unregister(&netdev_chain, nb);
|
||||
if (err)
|
||||
goto unlock;
|
||||
|
||||
for_each_net(net) {
|
||||
for_each_netdev(net, dev) {
|
||||
if (dev->flags & IFF_UP) {
|
||||
nb->notifier_call(nb, NETDEV_GOING_DOWN, dev);
|
||||
nb->notifier_call(nb, NETDEV_DOWN, dev);
|
||||
}
|
||||
nb->notifier_call(nb, NETDEV_UNREGISTER, dev);
|
||||
nb->notifier_call(nb, NETDEV_UNREGISTER_BATCH, dev);
|
||||
}
|
||||
}
|
||||
unlock:
|
||||
rtnl_unlock();
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -150,6 +150,7 @@ static void trace_drop_common(struct sk_buff *skb, void *location)
|
||||
for (i = 0; i < msg->entries; i++) {
|
||||
if (!memcmp(&location, msg->points[i].pc, sizeof(void *))) {
|
||||
msg->points[i].count++;
|
||||
atomic_inc(&data->dm_hit_count);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,21 +83,29 @@ assign:
|
||||
|
||||
static int ops_init(const struct pernet_operations *ops, struct net *net)
|
||||
{
|
||||
int err;
|
||||
int err = -ENOMEM;
|
||||
void *data = NULL;
|
||||
|
||||
if (ops->id && ops->size) {
|
||||
void *data = kzalloc(ops->size, GFP_KERNEL);
|
||||
data = kzalloc(ops->size, GFP_KERNEL);
|
||||
if (!data)
|
||||
return -ENOMEM;
|
||||
goto out;
|
||||
|
||||
err = net_assign_generic(net, *ops->id, data);
|
||||
if (err) {
|
||||
kfree(data);
|
||||
return err;
|
||||
}
|
||||
if (err)
|
||||
goto cleanup;
|
||||
}
|
||||
err = 0;
|
||||
if (ops->init)
|
||||
return ops->init(net);
|
||||
return 0;
|
||||
err = ops->init(net);
|
||||
if (!err)
|
||||
return 0;
|
||||
|
||||
cleanup:
|
||||
kfree(data);
|
||||
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static void ops_free(const struct pernet_operations *ops, struct net *net)
|
||||
@@ -448,12 +456,7 @@ static void __unregister_pernet_operations(struct pernet_operations *ops)
|
||||
static int __register_pernet_operations(struct list_head *list,
|
||||
struct pernet_operations *ops)
|
||||
{
|
||||
int err = 0;
|
||||
err = ops_init(ops, &init_net);
|
||||
if (err)
|
||||
ops_free(ops, &init_net);
|
||||
return err;
|
||||
|
||||
return ops_init(ops, &init_net);
|
||||
}
|
||||
|
||||
static void __unregister_pernet_operations(struct pernet_operations *ops)
|
||||
|
||||
@@ -952,9 +952,11 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
|
||||
goto adjust_others;
|
||||
}
|
||||
|
||||
data = kmalloc(size + sizeof(struct skb_shared_info), gfp_mask);
|
||||
data = kmalloc(size + SKB_DATA_ALIGN(sizeof(struct skb_shared_info)),
|
||||
gfp_mask);
|
||||
if (!data)
|
||||
goto nodata;
|
||||
size = SKB_WITH_OVERHEAD(ksize(data));
|
||||
|
||||
/* Copy only real data... and, alas, header. This should be
|
||||
* optimized for the cases when header is void.
|
||||
|
||||
Reference in New Issue
Block a user