Commit f9db9abb authored by Patrick McHardy's avatar Patrick McHardy

Merge coreworks.de:/home/kaber/src/bk-repos/linux-2.6

into coreworks.de:/home/kaber/src/net/net-2.6
parents 6c654e21 ec67cea4
...@@ -537,7 +537,7 @@ static struct net_device *register_vlan_device(const char *eth_IF_name, ...@@ -537,7 +537,7 @@ static struct net_device *register_vlan_device(const char *eth_IF_name,
out_free_unregister: out_free_unregister:
unregister_netdev(new_dev); unregister_netdev(new_dev);
goto out_put_dev; goto out_unlock;
out_free_newdev: out_free_newdev:
free_netdev(new_dev); free_netdev(new_dev);
......
...@@ -1250,7 +1250,7 @@ static struct net_protocol ipgre_protocol = { ...@@ -1250,7 +1250,7 @@ static struct net_protocol ipgre_protocol = {
static int __init ipgre_init(void) static int __init ipgre_init(void)
{ {
int err = -EINVAL; int err;
printk(KERN_INFO "GRE over IPv4 tunneling driver\n"); printk(KERN_INFO "GRE over IPv4 tunneling driver\n");
...@@ -1263,18 +1263,19 @@ static int __init ipgre_init(void) ...@@ -1263,18 +1263,19 @@ static int __init ipgre_init(void)
ipgre_tunnel_setup); ipgre_tunnel_setup);
if (!ipgre_fb_tunnel_dev) { if (!ipgre_fb_tunnel_dev) {
err = -ENOMEM; err = -ENOMEM;
goto fail; goto err1;
} }
ipgre_fb_tunnel_dev->init = ipgre_fb_tunnel_init; ipgre_fb_tunnel_dev->init = ipgre_fb_tunnel_init;
if ((err = register_netdev(ipgre_fb_tunnel_dev))) if ((err = register_netdev(ipgre_fb_tunnel_dev)))
goto fail; goto err2;
out: out:
return err; return err;
fail: err2:
inet_del_protocol(&ipgre_protocol, IPPROTO_GRE);
free_netdev(ipgre_fb_tunnel_dev); free_netdev(ipgre_fb_tunnel_dev);
err1:
inet_del_protocol(&ipgre_protocol, IPPROTO_GRE);
goto out; goto out;
} }
......
...@@ -246,7 +246,6 @@ static struct ip_tunnel * ipip_tunnel_locate(struct ip_tunnel_parm *parms, int c ...@@ -246,7 +246,6 @@ static struct ip_tunnel * ipip_tunnel_locate(struct ip_tunnel_parm *parms, int c
nt = dev->priv; nt = dev->priv;
SET_MODULE_OWNER(dev); SET_MODULE_OWNER(dev);
dev->init = ipip_tunnel_init; dev->init = ipip_tunnel_init;
dev->destructor = free_netdev;
nt->parms = *parms; nt->parms = *parms;
if (register_netdevice(dev) < 0) { if (register_netdevice(dev) < 0) {
...@@ -784,6 +783,7 @@ static void ipip_tunnel_setup(struct net_device *dev) ...@@ -784,6 +783,7 @@ static void ipip_tunnel_setup(struct net_device *dev)
dev->get_stats = ipip_tunnel_get_stats; dev->get_stats = ipip_tunnel_get_stats;
dev->do_ioctl = ipip_tunnel_ioctl; dev->do_ioctl = ipip_tunnel_ioctl;
dev->change_mtu = ipip_tunnel_change_mtu; dev->change_mtu = ipip_tunnel_change_mtu;
dev->destructor = free_netdev;
dev->type = ARPHRD_TUNNEL; dev->type = ARPHRD_TUNNEL;
dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr); dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr);
...@@ -876,18 +876,19 @@ static int __init ipip_init(void) ...@@ -876,18 +876,19 @@ static int __init ipip_init(void)
ipip_tunnel_setup); ipip_tunnel_setup);
if (!ipip_fb_tunnel_dev) { if (!ipip_fb_tunnel_dev) {
err = -ENOMEM; err = -ENOMEM;
goto fail; goto err1;
} }
ipip_fb_tunnel_dev->init = ipip_fb_tunnel_init; ipip_fb_tunnel_dev->init = ipip_fb_tunnel_init;
if ((err = register_netdev(ipip_fb_tunnel_dev))) if ((err = register_netdev(ipip_fb_tunnel_dev)))
goto fail; goto err2;
out: out:
return err; return err;
fail: err2:
xfrm4_tunnel_deregister(&ipip_handler);
free_netdev(ipip_fb_tunnel_dev); free_netdev(ipip_fb_tunnel_dev);
err1:
xfrm4_tunnel_deregister(&ipip_handler);
goto out; goto out;
} }
......
...@@ -814,18 +814,19 @@ int __init sit_init(void) ...@@ -814,18 +814,19 @@ int __init sit_init(void)
ipip6_tunnel_setup); ipip6_tunnel_setup);
if (!ipip6_fb_tunnel_dev) { if (!ipip6_fb_tunnel_dev) {
err = -ENOMEM; err = -ENOMEM;
goto fail; goto err1;
} }
ipip6_fb_tunnel_dev->init = ipip6_fb_tunnel_init; ipip6_fb_tunnel_dev->init = ipip6_fb_tunnel_init;
if ((err = register_netdev(ipip6_fb_tunnel_dev))) if ((err = register_netdev(ipip6_fb_tunnel_dev)))
goto fail; goto err2;
out: out:
return err; return err;
fail: err2:
inet_del_protocol(&sit_protocol, IPPROTO_IPV6);
free_netdev(ipip6_fb_tunnel_dev); free_netdev(ipip6_fb_tunnel_dev);
err1:
inet_del_protocol(&sit_protocol, IPPROTO_IPV6);
goto out; goto out;
} }
...@@ -139,7 +139,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg) ...@@ -139,7 +139,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
struct tcf_proto_ops *tp_ops; struct tcf_proto_ops *tp_ops;
struct Qdisc_class_ops *cops; struct Qdisc_class_ops *cops;
unsigned long cl = 0; unsigned long cl = 0;
unsigned long fh, fh_s; unsigned long fh;
int err; int err;
if (prio == 0) { if (prio == 0) {
...@@ -231,8 +231,12 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg) ...@@ -231,8 +231,12 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
tp->classify = tp_ops->classify; tp->classify = tp_ops->classify;
tp->classid = parent; tp->classid = parent;
err = -EBUSY; err = -EBUSY;
if (!try_module_get(tp_ops->owner) || if (!try_module_get(tp_ops->owner)) {
(err = tp_ops->init(tp)) != 0) { kfree(tp);
goto errout;
}
if ((err = tp_ops->init(tp)) != 0) {
module_put(tp_ops->owner);
kfree(tp); kfree(tp);
goto errout; goto errout;
} }
...@@ -245,7 +249,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg) ...@@ -245,7 +249,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
} else if (tca[TCA_KIND-1] && rtattr_strcmp(tca[TCA_KIND-1], tp->ops->kind)) } else if (tca[TCA_KIND-1] && rtattr_strcmp(tca[TCA_KIND-1], tp->ops->kind))
goto errout; goto errout;
fh_s = fh = tp->ops->get(tp, t->tcm_handle); fh = tp->ops->get(tp, t->tcm_handle);
if (fh == 0) { if (fh == 0) {
if (n->nlmsg_type == RTM_DELTFILTER && t->tcm_handle == 0) { if (n->nlmsg_type == RTM_DELTFILTER && t->tcm_handle == 0) {
...@@ -253,7 +257,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg) ...@@ -253,7 +257,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
*back = tp->next; *back = tp->next;
qdisc_unlock_tree(dev); qdisc_unlock_tree(dev);
tfilter_notify(skb, n, tp, fh_s, RTM_DELTFILTER); tfilter_notify(skb, n, tp, fh, RTM_DELTFILTER);
tcf_destroy(tp); tcf_destroy(tp);
err = 0; err = 0;
goto errout; goto errout;
...@@ -272,7 +276,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg) ...@@ -272,7 +276,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
case RTM_DELTFILTER: case RTM_DELTFILTER:
err = tp->ops->delete(tp, fh); err = tp->ops->delete(tp, fh);
if (err == 0) if (err == 0)
tfilter_notify(skb, n, tp, fh_s, RTM_DELTFILTER); tfilter_notify(skb, n, tp, fh, RTM_DELTFILTER);
goto errout; goto errout;
case RTM_GETTFILTER: case RTM_GETTFILTER:
err = tfilter_notify(skb, n, tp, fh, RTM_NEWTFILTER); err = tfilter_notify(skb, n, tp, fh, RTM_NEWTFILTER);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment