git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
net
/
wanrouter
/
wanmain.c
diff --git
a/net/wanrouter/wanmain.c
b/net/wanrouter/wanmain.c
index
9479659
..
c34833d
100644
(file)
--- a/
net/wanrouter/wanmain.c
+++ b/
net/wanrouter/wanmain.c
@@
-42,6
+42,7
@@
* Jun 02, 1999 Gideon Hack Updates for Linux 2.0.X and 2.2.X kernels.
*****************************************************************************/
* Jun 02, 1999 Gideon Hack Updates for Linux 2.0.X and 2.2.X kernels.
*****************************************************************************/
+#include <linux/config.h>
#include <linux/stddef.h> /* offsetof(), etc. */
#include <linux/capability.h>
#include <linux/errno.h> /* return codes */
#include <linux/stddef.h> /* offsetof(), etc. */
#include <linux/capability.h>
#include <linux/errno.h> /* return codes */
@@
-642,16
+643,18
@@
static int wanrouter_device_new_if(struct wan_device *wandev,
if (cnf->config_id == WANCONFIG_MPPP) {
#ifdef CONFIG_WANPIPE_MULTPPP
if (cnf->config_id == WANCONFIG_MPPP) {
#ifdef CONFIG_WANPIPE_MULTPPP
- pppdev = k
z
alloc(sizeof(struct ppp_device), GFP_KERNEL);
+ pppdev = k
m
alloc(sizeof(struct ppp_device), GFP_KERNEL);
err = -ENOBUFS;
if (pppdev == NULL)
goto out;
err = -ENOBUFS;
if (pppdev == NULL)
goto out;
- pppdev->dev = kzalloc(sizeof(struct net_device), GFP_KERNEL);
+ memset(pppdev, 0, sizeof(struct ppp_device));
+ pppdev->dev = kmalloc(sizeof(struct net_device), GFP_KERNEL);
if (pppdev->dev == NULL) {
kfree(pppdev);
err = -ENOBUFS;
goto out;
}
if (pppdev->dev == NULL) {
kfree(pppdev);
err = -ENOBUFS;
goto out;
}
+ memset(pppdev->dev, 0, sizeof(struct net_device));
err = wandev->new_if(wandev, (struct net_device *)pppdev, cnf);
dev = pppdev->dev;
#else
err = wandev->new_if(wandev, (struct net_device *)pppdev, cnf);
dev = pppdev->dev;
#else
@@
-661,10
+664,11
@@
static int wanrouter_device_new_if(struct wan_device *wandev,
goto out;
#endif
} else {
goto out;
#endif
} else {
- dev = k
z
alloc(sizeof(struct net_device), GFP_KERNEL);
+ dev = k
m
alloc(sizeof(struct net_device), GFP_KERNEL);
err = -ENOBUFS;
if (dev == NULL)
goto out;
err = -ENOBUFS;
if (dev == NULL)
goto out;
+ memset(dev, 0, sizeof(struct net_device));
err = wandev->new_if(wandev, dev, cnf);
}
err = wandev->new_if(wandev, dev, cnf);
}