From: Chas W. (CONTRACTOR) <ch...@cm...> - 2010-08-17 01:33:03
|
In message <OF2...@gd...>,Jayson A Dyke writes: >I'm using the linux kernel v2.6.31 and using linux-atm to create a LEC >interface. Every time I go to start zeppelin it causes a kernel oops. The >text of that kernel oops is BUG: unable to handle kernel NULL pointer >dereferenced at (null). After some investigation by git bisecting the >kernel, I narrowed it down to one commit (SHA1: e3804cbebb67887) that >removed a deprecated kernel configuration option of COMPAT_NET_DEV_OPS. > >I tried this with linux-atm 2.4.1, 2.5.1 and pulling the current >development source and compiling it. > >Does anyone have any ideas on how to fix this? I need that interface for >something and its only a LEC. there have been two problems recently in the kernel with the lec driver. i have attached there here in hopes of solving your problem. it would be a bit more helpful to get a traceback though from your oops. the first one is likely your problem, lec_init() was happening too late. commit eb0445887a45a3705522aac6c2d8367e90358792 Author: chas williams - CONTRACTOR <ch...@cm...> Date: Fri Dec 4 05:19:30 2009 +0000 atm: [lec] initialize .netdev_ops before calling register_netdev() fix oops when initializing lane interfaces. lec should probably be changed to use alloc_netdev() instead. Signed-off-by: Chas Williams - CONTRACTOR <ch...@cm...> Signed-off-by: David S. Miller <da...@da...> diff --git a/net/atm/lec.c b/net/atm/lec.c index b2d6445..42749b7 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c @@ -62,7 +62,6 @@ static int lec_open(struct net_device *dev); static netdev_tx_t lec_start_xmit(struct sk_buff *skb, struct net_device *dev); static int lec_close(struct net_device *dev); -static void lec_init(struct net_device *dev); static struct lec_arp_table *lec_arp_find(struct lec_priv *priv, const unsigned char *mac_addr); static int lec_arp_remove(struct lec_priv *priv, @@ -670,13 +669,6 @@ static const struct net_device_ops lec_netdev_ops = { .ndo_set_multicast_list = lec_set_multicast_list, }; - -static void lec_init(struct net_device *dev) -{ - dev->netdev_ops = &lec_netdev_ops; - printk("%s: Initialized!\n", dev->name); -} - static const unsigned char lec_ctrl_magic[] = { 0xff, 0x00, @@ -893,6 +885,7 @@ static int lecd_attach(struct atm_vcc *vcc, int arg) dev_lec[i] = alloc_etherdev(size); if (!dev_lec[i]) return -ENOMEM; + dev_lec[i]->netdev_ops = &lec_netdev_ops; snprintf(dev_lec[i]->name, IFNAMSIZ, "lec%d", i); if (register_netdev(dev_lec[i])) { free_netdev(dev_lec[i]); @@ -901,7 +894,6 @@ static int lecd_attach(struct atm_vcc *vcc, int arg) priv = netdev_priv(dev_lec[i]); priv->is_trdev = is_trdev; - lec_init(dev_lec[i]); } else { priv = netdev_priv(dev_lec[i]); if (priv->lecd) commit cf932353403c7e477a6c6596c0a6a23c6db5f406 Author: root <ro...@re...> Date: Fri Jul 16 19:33:19 2010 -0400 atm: [lec] hold the rtnl lock around dev_set_mtu() Signed-off-by: Chas Williams - CONTRACTOR <ch...@cm...> diff --git a/net/atm/lec.c b/net/atm/lec.c index d98bde1..d6b5511 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c @@ -491,9 +491,11 @@ static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb) priv->lane2_ops = NULL; if (priv->lane_version > 1) priv->lane2_ops = &lane2_ops; + rtnl_lock(); if (dev_set_mtu(dev, mesg->content.config.mtu)) pr_info("%s: change_mtu to %d failed\n", dev->name, mesg->content.config.mtu); + rtnl_unlock(); priv->is_proxy = mesg->content.config.is_proxy; break; case l_flush_tran_id: |