diff options
Diffstat (limited to 'net')
| -rw-r--r-- | net/ipv6/mcast.c | 1 | ||||
| -rw-r--r-- | net/ipv6/route.c | 2 | ||||
| -rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 23 | ||||
| -rw-r--r-- | net/sched/sch_sfq.c | 6 |
4 files changed, 18 insertions, 14 deletions
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index b853f06cc148..16c33e308121 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
| @@ -257,7 +257,6 @@ static struct inet6_dev *ip6_mc_find_dev_rcu(struct net *net, | |||
| 257 | 257 | ||
| 258 | if (rt) { | 258 | if (rt) { |
| 259 | dev = rt->dst.dev; | 259 | dev = rt->dst.dev; |
| 260 | dev_hold(dev); | ||
| 261 | dst_release(&rt->dst); | 260 | dst_release(&rt->dst); |
| 262 | } | 261 | } |
| 263 | } else | 262 | } else |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 8c2e3ab58f2a..22b766407de1 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
| @@ -1077,7 +1077,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev, | |||
| 1077 | struct net *net = dev_net(dev); | 1077 | struct net *net = dev_net(dev); |
| 1078 | 1078 | ||
| 1079 | if (unlikely(!idev)) | 1079 | if (unlikely(!idev)) |
| 1080 | return NULL; | 1080 | return ERR_PTR(-ENODEV); |
| 1081 | 1081 | ||
| 1082 | rt = ip6_dst_alloc(&net->ipv6.ip6_dst_ops, dev, 0); | 1082 | rt = ip6_dst_alloc(&net->ipv6.ip6_dst_ops, dev, 0); |
| 1083 | if (unlikely(!rt)) { | 1083 | if (unlikely(!rt)) { |
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 10687692831e..b49da6c925b3 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
| @@ -943,20 +943,21 @@ ctnetlink_del_conntrack(struct sock *ctnl, struct sk_buff *skb, | |||
| 943 | } | 943 | } |
| 944 | } | 944 | } |
| 945 | 945 | ||
| 946 | if (nf_conntrack_event_report(IPCT_DESTROY, ct, | 946 | if (del_timer(&ct->timeout)) { |
| 947 | NETLINK_CB(skb).pid, | 947 | if (nf_conntrack_event_report(IPCT_DESTROY, ct, |
| 948 | nlmsg_report(nlh)) < 0) { | 948 | NETLINK_CB(skb).pid, |
| 949 | nlmsg_report(nlh)) < 0) { | ||
| 950 | nf_ct_delete_from_lists(ct); | ||
| 951 | /* we failed to report the event, try later */ | ||
| 952 | nf_ct_insert_dying_list(ct); | ||
| 953 | nf_ct_put(ct); | ||
| 954 | return 0; | ||
| 955 | } | ||
| 956 | /* death_by_timeout would report the event again */ | ||
| 957 | set_bit(IPS_DYING_BIT, &ct->status); | ||
| 949 | nf_ct_delete_from_lists(ct); | 958 | nf_ct_delete_from_lists(ct); |
| 950 | /* we failed to report the event, try later */ | ||
| 951 | nf_ct_insert_dying_list(ct); | ||
| 952 | nf_ct_put(ct); | 959 | nf_ct_put(ct); |
| 953 | return 0; | ||
| 954 | } | 960 | } |
| 955 | |||
| 956 | /* death_by_timeout would report the event again */ | ||
| 957 | set_bit(IPS_DYING_BIT, &ct->status); | ||
| 958 | |||
| 959 | nf_ct_kill(ct); | ||
| 960 | nf_ct_put(ct); | 961 | nf_ct_put(ct); |
| 961 | 962 | ||
| 962 | return 0; | 963 | return 0; |
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index 60d47180f043..02a21abea65e 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c | |||
| @@ -469,11 +469,15 @@ enqueue: | |||
| 469 | if (slot->qlen == 1) { /* The flow is new */ | 469 | if (slot->qlen == 1) { /* The flow is new */ |
| 470 | if (q->tail == NULL) { /* It is the first flow */ | 470 | if (q->tail == NULL) { /* It is the first flow */ |
| 471 | slot->next = x; | 471 | slot->next = x; |
| 472 | q->tail = slot; | ||
| 473 | } else { | 472 | } else { |
| 474 | slot->next = q->tail->next; | 473 | slot->next = q->tail->next; |
| 475 | q->tail->next = x; | 474 | q->tail->next = x; |
| 476 | } | 475 | } |
| 476 | /* We put this flow at the end of our flow list. | ||
| 477 | * This might sound unfair for a new flow to wait after old ones, | ||
| 478 | * but we could endup servicing new flows only, and freeze old ones. | ||
| 479 | */ | ||
| 480 | q->tail = slot; | ||
| 477 | /* We could use a bigger initial quantum for new flows */ | 481 | /* We could use a bigger initial quantum for new flows */ |
| 478 | slot->allot = q->scaled_quantum; | 482 | slot->allot = q->scaled_quantum; |
| 479 | } | 483 | } |
