diff options
author | David S. Miller <davem@davemloft.net> | 2008-05-12 03:29:11 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-12 03:29:11 -0700 |
commit | 4951704b4e23d71b99ac933d8e6993bc6225ac13 (patch) | |
tree | afcc69d6ec071f5d0bb19517635e9b3cf8f668ba /include | |
parent | c4492586a618d18e8a5343a04bad0ec606064846 (diff) | |
download | blackbird-op-linux-4951704b4e23d71b99ac933d8e6993bc6225ac13.tar.gz blackbird-op-linux-4951704b4e23d71b99ac933d8e6993bc6225ac13.zip |
syncppp: Fix crashes.
The syncppp layer wants a mid-level netdev private pointer.
It was using netdev->priv but that only worked by accident,
and thus this scheme was broken when the device private
allocation strategy changed.
Add a proper mid-layer private pointer for uses like this,
update syncppp and all users, and remove the HDLC_PPP broken
tag from drivers/net/wan/Kconfig
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netdevice.h | 3 | ||||
-rw-r--r-- | include/net/syncppp.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 7c1d4466583b..746901774d49 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -715,6 +715,9 @@ struct net_device struct net *nd_net; #endif + /* mid-layer private */ + void *ml_priv; + /* bridge stuff */ struct net_bridge_port *br_port; /* macvlan */ diff --git a/include/net/syncppp.h b/include/net/syncppp.h index 877efa434700..e43f4070d892 100644 --- a/include/net/syncppp.h +++ b/include/net/syncppp.h @@ -59,7 +59,7 @@ struct ppp_device static inline struct sppp *sppp_of(struct net_device *dev) { - struct ppp_device **ppp = dev->priv; + struct ppp_device **ppp = dev->ml_priv; BUG_ON((*ppp)->dev != dev); return &(*ppp)->sppp; } |