diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-10 11:46:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-10 11:46:00 -0400 |
commit | 460fbf82c0842cad3f3c744c4dcb81978b7829f3 (patch) | |
tree | d19b6d7d18491a8fa423f3ac9f2b422863b8c373 /net/core/dev.c | |
parent | 68491d5892defca59ad4f604cace2b1e30889c14 (diff) | |
parent | b1a7ffcb7a047e99ab02424e651e0492f36095f7 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (35 commits)
[IPV6]: Deinline few large functions in inet6 code
[IPV4] ip_fragment: Always compute hash with ipfrag_lock held.
[NETFILTER]: Fix DNAT in LOCAL_OUT
[X25]: Restore skb->dev setting in x25_type_trans().
[NET]: Fix hotplug race during device registration.
[IPV6]: Unexport secure_ipv6_port_ephemeral
[NETFILTER]: Fix build with CONFIG_NETFILTER=y/m on IA64
[NET]: More kzalloc conversions.
[NET] kzalloc: use in alloc_netdev
[PKT_SCHED] act_police: Rename methods.
[TG3]: Speed up SRAM access (2nd version)
[TG3]: Kill some less useful flags
[NETFILTER]: H.323 helper: remove changelog
[NETFILTER]: Convert conntrack/ipt_REJECT to new checksumming functions
[NETFILTER]: Add address family specific checksum helpers
[NETFILTER]: Introduce infrastructure for address family specific operations
[NETFILTER]: Fix IP_NF_CONNTRACK_NETLINK dependency
[NETFILTER]: H.323 helper: add parameter 'default_rrq_ttl'
[NETFILTER]: H.323 helper: make get_h245_addr() static
[NETFILTER]: H.323 helper: change EXPORT_SYMBOL to EXPORT_SYMBOL_GPL
...
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 434220d093..2731570eba 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -3042,11 +3042,11 @@ void netdev_run_todo(void) | |||
3042 | 3042 | ||
3043 | switch(dev->reg_state) { | 3043 | switch(dev->reg_state) { |
3044 | case NETREG_REGISTERING: | 3044 | case NETREG_REGISTERING: |
3045 | dev->reg_state = NETREG_REGISTERED; | ||
3045 | err = netdev_register_sysfs(dev); | 3046 | err = netdev_register_sysfs(dev); |
3046 | if (err) | 3047 | if (err) |
3047 | printk(KERN_ERR "%s: failed sysfs registration (%d)\n", | 3048 | printk(KERN_ERR "%s: failed sysfs registration (%d)\n", |
3048 | dev->name, err); | 3049 | dev->name, err); |
3049 | dev->reg_state = NETREG_REGISTERED; | ||
3050 | break; | 3050 | break; |
3051 | 3051 | ||
3052 | case NETREG_UNREGISTERING: | 3052 | case NETREG_UNREGISTERING: |
@@ -3100,12 +3100,11 @@ struct net_device *alloc_netdev(int sizeof_priv, const char *name, | |||
3100 | alloc_size = (sizeof(*dev) + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST; | 3100 | alloc_size = (sizeof(*dev) + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST; |
3101 | alloc_size += sizeof_priv + NETDEV_ALIGN_CONST; | 3101 | alloc_size += sizeof_priv + NETDEV_ALIGN_CONST; |
3102 | 3102 | ||
3103 | p = kmalloc(alloc_size, GFP_KERNEL); | 3103 | p = kzalloc(alloc_size, GFP_KERNEL); |
3104 | if (!p) { | 3104 | if (!p) { |
3105 | printk(KERN_ERR "alloc_dev: Unable to allocate device.\n"); | 3105 | printk(KERN_ERR "alloc_dev: Unable to allocate device.\n"); |
3106 | return NULL; | 3106 | return NULL; |
3107 | } | 3107 | } |
3108 | memset(p, 0, alloc_size); | ||
3109 | 3108 | ||
3110 | dev = (struct net_device *) | 3109 | dev = (struct net_device *) |
3111 | (((long)p + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST); | 3110 | (((long)p + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST); |