* [GIT PULL 0/2] IEEE 802.15.4 last-minute fixes v3
@ 2009-08-06 12:26 Dmitry Eremin-Solenikov
2009-08-06 12:26 ` [PATCH 1/2] af_ieee802154: fix ioctl processing Dmitry Eremin-Solenikov
[not found] ` <1249561586-26927-1-git-send-email-dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 2 replies; 5+ messages in thread
From: Dmitry Eremin-Solenikov @ 2009-08-06 12:26 UTC (permalink / raw)
To: netdev; +Cc: David S. Miller, Sergey Lapin, linux-zigbee-devel
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(-)
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 1/2] af_ieee802154: fix ioctl processing 2009-08-06 12:26 [GIT PULL 0/2] IEEE 802.15.4 last-minute fixes v3 Dmitry Eremin-Solenikov @ 2009-08-06 12:26 ` Dmitry Eremin-Solenikov 2009-08-06 12:26 ` [PATCH 2/2] af_ieee802154: provide dummy get/setsockopt Dmitry Eremin-Solenikov [not found] ` <1249561586-26927-1-git-send-email-dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 1 sibling, 1 reply; 5+ messages in thread From: Dmitry Eremin-Solenikov @ 2009-08-06 12:26 UTC (permalink / raw) To: netdev; +Cc: David S. Miller, Sergey Lapin, linux-zigbee-devel 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 Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> --- net/ieee802154/af_ieee802154.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/net/ieee802154/af_ieee802154.c b/net/ieee802154/af_ieee802154.c index 3bb6bdb..af66180 100644 --- a/net/ieee802154/af_ieee802154.c +++ b/net/ieee802154/af_ieee802154.c @@ -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 && copy_to_user(arg, &ifr, sizeof(struct ifreq))) -- 1.6.3.3 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] af_ieee802154: provide dummy get/setsockopt 2009-08-06 12:26 ` [PATCH 1/2] af_ieee802154: fix ioctl processing Dmitry Eremin-Solenikov @ 2009-08-06 12:26 ` Dmitry Eremin-Solenikov 0 siblings, 0 replies; 5+ messages in thread From: Dmitry Eremin-Solenikov @ 2009-08-06 12:26 UTC (permalink / raw) To: netdev; +Cc: David S. Miller, Sergey Lapin, linux-zigbee-devel Provide dummt get/setsockopt implementations to stop these syscalls from oopsing on our sockets. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> --- net/ieee802154/dgram.c | 14 ++++++++++++++ net/ieee802154/raw.c | 14 ++++++++++++++ 2 files changed, 28 insertions(+), 0 deletions(-) diff --git a/net/ieee802154/dgram.c b/net/ieee802154/dgram.c index 14d3984..ba8b214 100644 --- a/net/ieee802154/dgram.c +++ b/net/ieee802154/dgram.c @@ -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, }; diff --git a/net/ieee802154/raw.c b/net/ieee802154/raw.c index fca44d5..9315977 100644 --- a/net/ieee802154/raw.c +++ b/net/ieee802154/raw.c @@ -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, }; -- 1.6.3.3 ^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <1249561586-26927-1-git-send-email-dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [GIT PULL 0/2] IEEE 802.15.4 last-minute fixes v3 [not found] ` <1249561586-26927-1-git-send-email-dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2009-08-06 20:23 ` David Miller [not found] ` <20090806.132327.210162548.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: David Miller @ 2009-08-06 20:23 UTC (permalink / raw) To: dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f From: Dmitry Eremin-Solenikov <dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Date: Thu, 6 Aug 2009 16:26:24 +0400 > 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 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <20090806.132327.210162548.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>]
* Re: [GIT PULL 0/2] IEEE 802.15.4 last-minute fixes v3 [not found] ` <20090806.132327.210162548.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> @ 2009-08-06 20:57 ` Dmitry Eremin-Solenikov 0 siblings, 0 replies; 5+ messages in thread From: Dmitry Eremin-Solenikov @ 2009-08-06 20:57 UTC (permalink / raw) To: David Miller Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f On Thu, Aug 06, 2009 at 01:23:27PM -0700, David Miller wrote: > From: Dmitry Eremin-Solenikov <dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Date: Thu, 6 Aug 2009 16:26:24 +0400 > > > 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 > > 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 :) -- 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-08-06 20:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-06 12:26 [GIT PULL 0/2] IEEE 802.15.4 last-minute fixes v3 Dmitry Eremin-Solenikov
2009-08-06 12:26 ` [PATCH 1/2] af_ieee802154: fix ioctl processing Dmitry Eremin-Solenikov
2009-08-06 12:26 ` [PATCH 2/2] af_ieee802154: provide dummy get/setsockopt Dmitry Eremin-Solenikov
[not found] ` <1249561586-26927-1-git-send-email-dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-08-06 20:23 ` [GIT PULL 0/2] IEEE 802.15.4 last-minute fixes v3 David Miller
[not found] ` <20090806.132327.210162548.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2009-08-06 20:57 ` Dmitry Eremin-Solenikov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox