Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6044ab32 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [NET]: Fix race condition about network device name allocation.
  [IPV4]: icmp: fix crash with sysctl_icmp_errors_use_inbound_ifaddr
  [NETFILTER]: nf_conntrack_ipv4: fix incorrect #ifdef config name
  [NETFILTER]: nf_conntrack: fix use-after-free in helper destroy callback invocation
  [IPSEC] pfkey: Load specific algorithm in pfkey_add rather than all
  [TCP] FRTO: Prevent state inconsistency in corner cases
  [TCP] FRTO: Add missing ECN CWR sending to one of the responses
  [NET]: Fix net/core/skbuff.c gcc-3.2.3 compilation error
  [RFKILL]: Fix check for correct rfkill allocation
  [IPV6]: Add ip6_tunnel.h to headers_install
parents d07b3c25 9093bbb2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -239,6 +239,7 @@ unifdef-y += ipc.h
unifdef-y += ipmi.h
unifdef-y += ipv6.h
unifdef-y += ipv6_route.h
unifdef-y += ip6_tunnel.h
unifdef-y += isdn.h
unifdef-y += isdnif.h
unifdef-y += isdn_divertif.h
+6 −4
Original line number Diff line number Diff line
@@ -3314,7 +3314,6 @@ void netdev_run_todo(void)
			continue;
		}

		netdev_unregister_sysfs(dev);
		dev->reg_state = NETREG_UNREGISTERED;

		netdev_wait_allrefs(dev);
@@ -3325,11 +3324,11 @@ void netdev_run_todo(void)
		BUG_TRAP(!dev->ip6_ptr);
		BUG_TRAP(!dev->dn_ptr);

		/* It must be the very last action,
		 * after this 'dev' may point to freed up memory.
		 */
		if (dev->destructor)
			dev->destructor(dev);

		/* Free network device */
		kobject_put(&dev->dev.kobj);
	}

out:
@@ -3480,6 +3479,9 @@ void unregister_netdevice(struct net_device *dev)
	/* Notifier chain MUST detach us from master device. */
	BUG_TRAP(!dev->master);

	/* Remove entries from sysfs */
	netdev_unregister_sysfs(dev);

	/* Finish processing unregister after unlock */
	net_set_todo(dev);

+7 −1
Original line number Diff line number Diff line
@@ -456,9 +456,15 @@ static struct class net_class = {
#endif
};

/* Delete sysfs entries but hold kobject reference until after all
 * netdev references are gone.
 */
void netdev_unregister_sysfs(struct net_device * net)
{
	device_del(&(net->dev));
	struct device *dev = &(net->dev);

	kobject_get(&dev->kobj);
	device_del(dev);
}

/* Create sysfs entries for network device. */
+2 −3
Original line number Diff line number Diff line
@@ -644,11 +644,10 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,

	/* Copy only real data... and, alas, header. This should be
	 * optimized for the cases when header is void. */
	memcpy(data + nhead, skb->head,
#ifdef NET_SKBUFF_DATA_USES_OFFSET
		skb->tail);
	memcpy(data + nhead, skb->head, skb->tail);
#else
		skb->tail - skb->head);
	memcpy(data + nhead, skb->head, skb->tail - skb->head);
#endif
	memcpy(data + size, skb_end_pointer(skb),
	       sizeof(struct skb_shared_info));
+4 −1
Original line number Diff line number Diff line
@@ -514,7 +514,10 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)

	saddr = iph->daddr;
	if (!(rt->rt_flags & RTCF_LOCAL)) {
		if (sysctl_icmp_errors_use_inbound_ifaddr)
		/* This is broken, skb_in->dev points to the outgoing device
		 * after the packet passes through ip_output().
		 */
		if (skb_in->dev && sysctl_icmp_errors_use_inbound_ifaddr)
			saddr = inet_select_addr(skb_in->dev, 0, RT_SCOPE_LINK);
		else
			saddr = 0;
Loading