IEEE 802.15.4 last-minute fixes v3
Subsystems (3)
I hope in this try I don't make any mistakes...
The following changes since commit 0bf52b981770cbf006323bab5177f2858a196766:
Ingo Molnar (1):
net: Fix spinlock use in alloc_netdev_mq()
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan.git for-linus
Dmitry Eremin-Solenikov (2):
af_ieee802154: fix ioctl processing
af_ieee802154: provide dummy get/setsockopt
net/ieee802154/af_ieee802154.c | 8 +++++--- net/ieee802154/dgram.c | 14 ++++++++++++++ net/ieee802154/raw.c | 14 ++++++++++++++ 3 files changed, 33 insertions(+), 3 deletions(-)
PATCH 1/2 af_ieee802154: fix ioctl processing
fix two errors in ioctl processing:
1) if the ioctl isn't supported one should return -ENOIOCTLCMD
2) don't call ndo_do_ioctl if the device doesn't provide it
--- net/ieee802154/af_ieee802154.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
net/ieee802154/af_ieee802154.c +5 -3
@@ -136,7 +136,7 @@ static int ieee802154_dev_ioctl(struct sock *sk, struct ifreq __user *arg, unsigned int cmd) {struct ifreq ifr; -int ret = -EINVAL ; +int ret = -ENOIOCTLCMD ;struct net_device *dev;if (copy_from_user (&ifr, arg,sizeof (struct ifreq )))
@@ -146,8 +146,10 @@ static int ieee802154_dev_ioctl(struct sock *sk, struct ifreq __user *arg,dev_load (sock_net (sk), ifr.ifr_name); dev =dev_get_by_name (sock_net (sk), ifr.ifr_name); -if (dev->type ==ARPHRD_IEEE802154 || - dev->type ==ARPHRD_IEEE802154_PHY ) + +if ((dev->type ==ARPHRD_IEEE802154 || + dev->type ==ARPHRD_IEEE802154_PHY ) && + dev->netdev_ops->ndo_do_ioctl) ret = dev->netdev_ops->ndo_do_ioctl (dev, &ifr, cmd);if (!ret &©_to_user (arg, &ifr,sizeof (struct ifreq )))
Signature · 1 line
1.6.3.3
PATCH 2/2 af_ieee802154: provide dummy get/setsockopt
Provide dummt get/setsockopt implementations to stop these syscalls from oopsing on our sockets.
--- net/ieee802154/dgram.c | 14 ++++++++++++++ net/ieee802154/raw.c | 14 ++++++++++++++ 2 files changed, 28 insertions(+), 0 deletions(-)
net/ieee802154/dgram.c +14 -0
@@ -377,6 +377,18 @@ int ieee802154_dgram_deliver(struct net_device *dev, struct sk_buff *skb)return ret; } +static int dgram_getsockopt (struct sock *sk,int level,int optname, +char __user *optval,int __user *optlen) +{ +return -EOPNOTSUPP ; +} + +static int dgram_setsockopt (struct sock *sk,int level,int optname, +char __user *optval,int __user optlen) +{ +return -EOPNOTSUPP ; +} +struct proto ieee802154_dgram_prot = { .name ="IEEE-802.15.4-MAC" , .owner =THIS_MODULE ,
@@ -391,5 +403,7 @@ struct proto ieee802154_dgram_prot = { .connect = dgram_connect, .disconnect = dgram_disconnect, .ioctl = dgram_ioctl, + .getsockopt = dgram_getsockopt, + .setsockopt = dgram_setsockopt, };
net/ieee802154/raw.c +14 -0
@@ -238,6 +238,18 @@ void ieee802154_raw_deliver(struct net_device *dev, struct sk_buff *skb)read_unlock (&raw_lock); } +static int raw_getsockopt (struct sock *sk,int level,int optname, +char __user *optval,int __user *optlen) +{ +return -EOPNOTSUPP ; +} + +static int raw_setsockopt (struct sock *sk,int level,int optname, +char __user *optval,int __user optlen) +{ +return -EOPNOTSUPP ; +} +struct proto ieee802154_raw_prot = { .name ="IEEE-802.15.4-RAW" , .owner =THIS_MODULE ,
@@ -250,5 +262,7 @@ struct proto ieee802154_raw_prot = { .unhash = raw_unhash, .connect = raw_connect, .disconnect = raw_disconnect, + .getsockopt = raw_getsockopt, + .setsockopt = raw_setsockopt, };
Signature · 1 line
1.6.3.3
A message that is not in the archive (sent off-list or not yet received): 1249561586-26927-1-git-send-email-dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
From: Dmitry Eremin-Solenikov <[email protected]>
Date: Thu, 6 Aug 2009 16:26:24 +0400
Quoted 5 lines
git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan.gitfor-linusDmitry Eremin-Solenikov (2):
af_ieee802154: fix ioctl processing
af_ieee802154: provide dummy get/setsockopt
Pulled, thanks.
I'm currently waiting for Linus to pull in a locking fix from Ingo Molnar from my tree, and I don't want things to "magically" appear in a tree I've already asked him to pull from.
So I'll push these changes back out once he's taken that fix from Ingo.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
A message that is not in the archive (sent off-list or not yet received): 20090806.132327.210162548.davem-fT/PcQaiUtIeIZ0/[email protected]
Quoted 9 lines · David Miller
From: Dmitry Eremin-Solenikov <[email protected]>
Date: Thu, 6 Aug 2009 16:26:24 +0400Quoted 5 lines
git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan.gitfor-linusDmitry Eremin-Solenikov (2):
af_ieee802154: fix ioctl processing
af_ieee802154: provide dummy get/setsockopt
Quoted 8 lines
Pulled, thanks.
I'm currently waiting for Linus to pull in a locking fix from Ingo Molnar from my tree, and I don't want things to "magically" appear in a tree I've already asked him to pull from.
So I'll push these changes back out once he's taken that fix from Ingo.
Fine with me, thank you! Sorry for all the problems with this request :)
Signature · 9 lines
With best wishes Dmitry ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july